feat(core): add column pinning and grouping features to Griddy table
- Implement column pinning functionality allowing users to pin columns to the left or right. - Introduce data grouping capabilities for better data organization. - Enhance the theming guide with new styles for pinned columns and loading indicators. - Add infinite scroll support with loading indicators for improved user experience. - Update CSS styles to accommodate new features and improve visual feedback.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import type { Table } from '@tanstack/react-table'
|
||||
import type { ColumnFiltersState, RowSelectionState, SortingState } from '@tanstack/react-table'
|
||||
import type { ColumnFiltersState, ColumnPinningState, RowSelectionState, SortingState } from '@tanstack/react-table'
|
||||
import type { Virtualizer } from '@tanstack/react-virtual'
|
||||
|
||||
import { createSyncStore } from '@warkypublic/zustandsyncstore'
|
||||
|
||||
import type { DataAdapter, GriddyColumn, GriddyProps, GriddyUIState, GroupingConfig, PaginationConfig, SearchConfig, SelectionConfig } from './types'
|
||||
import type { DataAdapter, GriddyColumn, GriddyProps, GriddyUIState, GroupingConfig, InfiniteScrollConfig, PaginationConfig, SearchConfig, SelectionConfig } from './types'
|
||||
|
||||
// ─── Store State ─────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -21,6 +21,8 @@ export interface GriddyStoreState extends GriddyUIState {
|
||||
className?: string
|
||||
columnFilters?: ColumnFiltersState
|
||||
columns?: GriddyColumn<any>[]
|
||||
columnPinning?: ColumnPinningState
|
||||
onColumnPinningChange?: (pinning: ColumnPinningState) => void
|
||||
data?: any[]
|
||||
exportFilename?: string
|
||||
dataAdapter?: DataAdapter<any>
|
||||
@@ -28,6 +30,7 @@ export interface GriddyStoreState extends GriddyUIState {
|
||||
getRowId?: (row: any, index: number) => string
|
||||
grouping?: GroupingConfig
|
||||
height?: number | string
|
||||
infiniteScroll?: InfiniteScrollConfig
|
||||
keyboardNavigation?: boolean
|
||||
manualFiltering?: boolean
|
||||
manualSorting?: boolean
|
||||
|
||||
Reference in New Issue
Block a user