@geovi/the-datagrid 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +163 -72
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/community-api-manifest.json +324 -0
- package/dist/BoolEditor.cjs +2 -0
- package/dist/BoolEditor.js +3503 -0
- package/dist/BoolFilter.cjs +2 -0
- package/dist/BoolFilter.js +3527 -0
- package/dist/DateEditor.cjs +2 -0
- package/dist/DateEditor.js +2922 -0
- package/dist/DateFilter.cjs +2 -0
- package/dist/DateFilter.js +2979 -0
- package/dist/NumberFilter.cjs +2 -0
- package/dist/NumberFilter.js +2968 -0
- package/dist/NumericEditor.cjs +2 -0
- package/dist/NumericEditor.js +2923 -0
- package/dist/SelectFilter.cjs +42 -0
- package/dist/SelectFilter.js +8275 -0
- package/dist/StringFilter.cjs +2 -0
- package/dist/StringFilter.js +2949 -0
- package/dist/base.css +1 -0
- package/dist/community-api-manifest.json +324 -0
- package/dist/community-package-manifest.json +35 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +14 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/editors/BoolEditor.d.ts +8 -0
- package/dist/editors/BoolEditor.d.ts.map +1 -0
- package/dist/editors/DateEditor.d.ts +17 -0
- package/dist/editors/DateEditor.d.ts.map +1 -0
- package/dist/editors/NumericEditor.d.ts +11 -0
- package/dist/editors/NumericEditor.d.ts.map +1 -0
- package/dist/editors/editorTypes.d.ts +21 -0
- package/dist/editors/editorTypes.d.ts.map +1 -0
- package/dist/editors/index.d.ts +8 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/filters/editors/BoolFilter.d.ts +21 -0
- package/dist/filters/editors/BoolFilter.d.ts.map +1 -0
- package/dist/filters/editors/DateFilter.d.ts +8 -9
- package/dist/filters/editors/DateFilter.d.ts.map +1 -1
- package/dist/filters/editors/NumberFilter.d.ts +8 -9
- package/dist/filters/editors/NumberFilter.d.ts.map +1 -1
- package/dist/filters/editors/SelectFilter.d.ts +10 -11
- package/dist/filters/editors/SelectFilter.d.ts.map +1 -1
- package/dist/filters/editors/StringFilter.d.ts +25 -0
- package/dist/filters/editors/StringFilter.d.ts.map +1 -0
- package/dist/filters/editors/editorTypes.d.ts +13 -0
- package/dist/filters/editors/editorTypes.d.ts.map +1 -0
- package/dist/filters/editors/index.d.ts +8 -0
- package/dist/filters/editors/index.d.ts.map +1 -1
- package/dist/filters/utils.d.ts +9 -0
- package/dist/filters/utils.d.ts.map +1 -1
- package/dist/grid/ReactDataGrid.d.ts +6 -4
- package/dist/grid/ReactDataGrid.d.ts.map +1 -1
- package/dist/grid/components/ColumnGroupHeaderCell.d.ts +29 -0
- package/dist/grid/components/ColumnGroupHeaderCell.d.ts.map +1 -0
- package/dist/grid/components/FilterCell.d.ts +11 -1
- package/dist/grid/components/FilterCell.d.ts.map +1 -1
- package/dist/grid/components/FilterOperatorMenu.d.ts +10 -1
- package/dist/grid/components/FilterOperatorMenu.d.ts.map +1 -1
- package/dist/grid/components/GridBody.d.ts +29 -1
- package/dist/grid/components/GridBody.d.ts.map +1 -1
- package/dist/grid/components/GridContextMenuLayer.d.ts +27 -0
- package/dist/grid/components/GridContextMenuLayer.d.ts.map +1 -0
- package/dist/grid/components/GridHeader.d.ts +37 -2
- package/dist/grid/components/GridHeader.d.ts.map +1 -1
- package/dist/grid/components/HeaderCell.d.ts +14 -2
- package/dist/grid/components/HeaderCell.d.ts.map +1 -1
- package/dist/grid/components/MobileGridList.d.ts +13 -2
- package/dist/grid/components/MobileGridList.d.ts.map +1 -1
- package/dist/grid/engine/tanstackAdapter.d.ts.map +1 -1
- package/dist/grid/utils/columnGroups.d.ts +75 -0
- package/dist/grid/utils/columnGroups.d.ts.map +1 -0
- package/dist/grid/utils/columnSizing.d.ts +2 -1
- package/dist/grid/utils/columnSizing.d.ts.map +1 -1
- package/dist/grid/utils/contextMenuPosition.d.ts +8 -0
- package/dist/grid/utils/contextMenuPosition.d.ts.map +1 -0
- package/dist/grid/utils/editing.d.ts +6 -1
- package/dist/grid/utils/editing.d.ts.map +1 -1
- package/dist/index.cjs +48 -0
- package/dist/index.css +1 -1
- package/dist/index.js +14180 -9784
- package/dist/main.d.ts +5 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/sorting/utils.d.ts +24 -7
- package/dist/sorting/utils.d.ts.map +1 -1
- package/dist/style/theme/amber-dark/index.css +1 -0
- package/dist/style/theme/amber-light/index.css +1 -0
- package/dist/style/theme/blue-dark/index.css +1 -0
- package/dist/style/theme/blue-light/index.css +1 -0
- package/dist/style/theme/default-dark/index.css +1 -0
- package/dist/style/theme/default-light/index.css +1 -0
- package/dist/style/theme/green-dark/index.css +1 -0
- package/dist/style/theme/green-light/index.css +1 -0
- package/dist/style/theme/pink-dark/index.css +1 -0
- package/dist/style/theme/pink-light/index.css +1 -0
- package/dist/types/TypeColumn.d.ts +2 -0
- package/dist/types/TypeColumn.d.ts.map +1 -0
- package/dist/types/TypeDataGridProps.d.ts +2 -0
- package/dist/types/TypeDataGridProps.d.ts.map +1 -0
- package/dist/types/TypeDataSource.d.ts +2 -0
- package/dist/types/TypeDataSource.d.ts.map +1 -0
- package/dist/types/TypeFilterValue.d.ts +2 -0
- package/dist/types/TypeFilterValue.d.ts.map +1 -0
- package/dist/types/TypePaginationProps.d.ts +2 -0
- package/dist/types/TypePaginationProps.d.ts.map +1 -0
- package/dist/types/TypeSelected.d.ts +2 -0
- package/dist/types/TypeSelected.d.ts.map +1 -0
- package/dist/types/TypeSize.d.ts +2 -0
- package/dist/types/TypeSize.d.ts.map +1 -0
- package/dist/types/TypeSortInfo.d.ts +2 -0
- package/dist/types/TypeSortInfo.d.ts.map +1 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types.d.ts +566 -20
- package/dist/types.d.ts.map +1 -1
- package/package.json +184 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Geo Vi and the-datagrid contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Documentation and live examples: https://geo-vi.github.io/the-datagrid/
|
|
|
12
12
|
- Opt-in global table search through a separate, tree-shakeable entry
|
|
13
13
|
- Opt-in contextual column-visibility toolbar with a right-side action slot
|
|
14
14
|
- Column management (reorder, resize, auto-size)
|
|
15
|
+
- Stacked and nested column headers with split/rejoin and group resizing
|
|
15
16
|
- Pagination (local + remote)
|
|
16
17
|
- Row selection (checkbox column)
|
|
17
18
|
- Modern shadcn-aligned look-and-feel with packaged styles
|
|
@@ -26,13 +27,14 @@ public API and observable behavior of
|
|
|
26
27
|
After changing the package dependency and import specifier, public
|
|
27
28
|
Inovua-shaped application business logic should not require a rewrite.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
TypeScript fields: it includes defaults,
|
|
32
|
-
and timing, controlled/uncontrolled state,
|
|
33
|
-
keyboard and focus interaction, and
|
|
30
|
+
The audited Community 5.10.2 release gate is implemented and backed by
|
|
31
|
+
type, runtime, browser, packed-package, and performance tests. Compatibility
|
|
32
|
+
covers more than similarly named TypeScript fields: it includes defaults,
|
|
33
|
+
runtime behavior, callback payloads and timing, controlled/uncontrolled state,
|
|
34
|
+
local and remote data flow, layout, keyboard and focus interaction, and
|
|
35
|
+
accessibility behavior.
|
|
34
36
|
|
|
35
|
-
The
|
|
37
|
+
The Issue 17 and Issue 31–45 compatibility batches implement and
|
|
36
38
|
regression-test:
|
|
37
39
|
|
|
38
40
|
- Inovua's `idProperty`, theme, row/filter height, text-selection, filter-menu,
|
|
@@ -49,6 +51,9 @@ regression-test:
|
|
|
49
51
|
- inline editing (`editable`, `editStartEvent`, column editors, lifecycle
|
|
50
52
|
callbacks, cancellation, focus, and keyboard navigation);
|
|
51
53
|
- object- or function-valued whole-row `rowStyle`.
|
|
54
|
+
- stacked and nested column groups, custom group headers, split/rejoin
|
|
55
|
+
reordering, controlled group moves, proportional group resizing, and
|
|
56
|
+
horizontal-virtualization geometry;
|
|
52
57
|
- the standalone
|
|
53
58
|
`@geovi/the-datagrid/packages/TextInput` compatibility entry, including its
|
|
54
59
|
value-first callbacks, clear tool, legacy class hooks, and imperative ref;
|
|
@@ -56,14 +61,14 @@ regression-test:
|
|
|
56
61
|
- `getVirtualList().adjustHeights()` for instantiated variable-height rows in
|
|
57
62
|
virtual and non-virtual layouts.
|
|
58
63
|
|
|
59
|
-
This closes
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
This closes the audited Community gate. The
|
|
65
|
+
[source release ledger](docs/inovua-community-5.10.2-compatibility.md) maps
|
|
66
|
+
every child issue to executable evidence, and
|
|
67
|
+
[`community-api-manifest.json`](community-api-manifest.json) records the
|
|
68
|
+
behavior-backed computed API, plugins, types, and Enterprise exclusions.
|
|
69
|
+
Unknown computed method names are absent instead of being fabricated as no-op
|
|
70
|
+
functions. Any future mismatch is a compatibility regression and must be
|
|
71
|
+
tracked with executable coverage.
|
|
67
72
|
|
|
68
73
|
Issue 48 explicitly adopts Inovua's standalone `TextInput` toolkit path. Migrate
|
|
69
74
|
its default import to `@geovi/the-datagrid/packages/TextInput`; the package also
|
|
@@ -79,8 +84,7 @@ before treating the current package as a drop-in runtime replacement.
|
|
|
79
84
|
## Implemented today
|
|
80
85
|
|
|
81
86
|
The following inventory describes behavior that ships in the current package.
|
|
82
|
-
|
|
83
|
-
Inovua compatibility audit is complete. The public docs contain the full
|
|
87
|
+
The public docs contain the full
|
|
84
88
|
[source-backed implemented-surface reference](https://geo-vi.github.io/the-datagrid/docs/reference/implemented-surface),
|
|
85
89
|
including exact defaults, timing, transform order, exports, and imperative
|
|
86
90
|
method allowlists.
|
|
@@ -107,7 +111,9 @@ method allowlists.
|
|
|
107
111
|
- **Columns and cells:** stable `id`/`name` identity, controlled rendered order,
|
|
108
112
|
callback-driven drag reordering, explicit visibility, custom headers and cell
|
|
109
113
|
renderers, per-column sorting/filtering/search configuration, alignment, cell
|
|
110
|
-
classes/styles, and header props.
|
|
114
|
+
classes/styles, and header props. Root `groups`, `column.group`, and nested
|
|
115
|
+
`groups[].group` render accessible stacked headers with automatic split/rejoin
|
|
116
|
+
segments, block dragging, and proportional min/max-clamped resizing.
|
|
111
117
|
- **Column and row sizing:** controlled `width`/`flex`, uncontrolled
|
|
112
118
|
`defaultWidth`/`defaultFlex`, `minWidth`/`maxWidth` clamps, proportional flex
|
|
113
119
|
allocation, the upstream 40px implicit column minimum (while preserving an
|
|
@@ -119,9 +125,10 @@ method allowlists.
|
|
|
119
125
|
- **Filtering and sorting:** inferred or explicitly controlled filter-row
|
|
120
126
|
visibility, uncontrolled local filters, externally owned controlled filter
|
|
121
127
|
state, custom filter registries and editors, filter operator menus, single
|
|
122
|
-
sorting,
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
sorting, persistent array-valued multi-sorting, custom comparator registries
|
|
129
|
+
and sort tools, configurable initial direction, optional unsorting, and
|
|
130
|
+
configurable scroll reset behavior. Filter and sort changes reset pagination
|
|
131
|
+
to the first page.
|
|
125
132
|
- **Pagination:** controlled or uncontrolled `skip` and `limit`, local and remote
|
|
126
133
|
modes, configurable page sizes, a built-in accessible pager, an
|
|
127
134
|
Inovua-shaped `renderPaginationToolbar` contract, and reload/refresh/page
|
|
@@ -165,9 +172,8 @@ method allowlists.
|
|
|
165
172
|
observers.
|
|
166
173
|
The editing subset includes `startEdit`, `tryStartEdit`, `completeEdit`,
|
|
167
174
|
`cancelEdit`, `getCurrentEditInfo`, `isInEdit`, and
|
|
168
|
-
`currentEditCompletePromise`.
|
|
169
|
-
|
|
170
|
-
behavior.
|
|
175
|
+
`currentEditCompletePromise`. The API is explicit and behavior-backed;
|
|
176
|
+
unknown method-like properties resolve to `undefined`.
|
|
171
177
|
|
|
172
178
|
### Migration: data-transform ownership
|
|
173
179
|
|
|
@@ -193,30 +199,41 @@ for rationale and migration examples.
|
|
|
193
199
|
|
|
194
200
|
The main entry, `@geovi/the-datagrid`, exports:
|
|
195
201
|
|
|
196
|
-
- default and named `ReactDataGrid`, plus
|
|
197
|
-
|
|
198
|
-
- `
|
|
202
|
+
- default and named `ReactDataGrid`, plus executable descriptors for the
|
|
203
|
+
built-in sorting, filtering, menu, and cell-selection plugins;
|
|
204
|
+
- `BoolEditor`, `DateEditor`, `NumericEditor`, `StringFilter`, `BoolFilter`,
|
|
205
|
+
`DateFilter`, `NumberFilter`, `SelectFilter`, `CheckBox`, and the named
|
|
199
206
|
`TextInput`;
|
|
200
207
|
- `DEFAULT_FILTER_TYPES` and its `filterTypes` alias;
|
|
201
208
|
- the public types `CellProps`, `IColumn`, `SortDirection`, `TypeColumn`,
|
|
202
209
|
`TypeColumns`, `TypeColumnEditorProps`, `TypeColumnResizeContext`,
|
|
203
210
|
`TypeColumnResizeInfo`, `TypeColumnEditorCell`, `TypeComputedColumn`,
|
|
204
211
|
`TypeComputedColumnsMap`, `TypeComputedProps`, `TypeDataGridProps`,
|
|
205
|
-
`
|
|
212
|
+
`TypeColumnGroup`, `TypeColumnGroupDOMProps`,
|
|
213
|
+
`TypeColumnGroupHeaderProps`, `TypeDataSourceArgs`, `TypeDataSource`,
|
|
214
|
+
`TypeDataSourceResult`,
|
|
206
215
|
`TypePaginationProps`, `TypeLoadMaskProps`, `TypeEditInfo`, `TypeStartEditArgs`,
|
|
207
216
|
`TypeTryStartEditArgs`, `TypeCompleteEditArgs`, `TypeCancelEditArgs`,
|
|
208
217
|
`TypeFilterOperator`, `TypeFilterType`, `TypeFilterTypes`, `TypeFilterValue`,
|
|
209
218
|
`TypeGetColumnByParam`, `TypeI18n`, `TypeOnSelectionChangeArg`,
|
|
210
219
|
`TypePaginationMode`, `TypeRowSelection`, `TypeRowStyle`, `TypeRowStyleArgs`,
|
|
211
220
|
`TypeRowStyleProps`, `TypeShowCellBorders`, `TypeSize`, `TypeSingleFilterValue`,
|
|
212
|
-
`TypeSingleSortInfo`, `TypeSortInfo`, `
|
|
213
|
-
`
|
|
214
|
-
|
|
221
|
+
`TypeSingleSortInfo`, `TypeSortInfo`, `TypeSortFunction`,
|
|
222
|
+
`TypeSortFunctions`, `TypeColumnSort`, `TypeSortToolProps`,
|
|
223
|
+
`TypeRenderSortTool`, `TypeCheckboxColumn`, `TypeCheckboxProps`,
|
|
224
|
+
`TextInputProps`, `TypeTextInputProps`, and the TextInput
|
|
225
|
+
callback/input/wrapper/clear-button helper types.
|
|
226
|
+
|
|
227
|
+
The same editors and filters are available through their documented deep
|
|
228
|
+
imports. `@geovi/the-datagrid/types` and the documented
|
|
229
|
+
`@geovi/the-datagrid/types/Type*` paths expose the migration type vocabulary.
|
|
230
|
+
The main and Community compatibility entries publish both ESM and CommonJS.
|
|
215
231
|
|
|
216
232
|
The optional `@geovi/the-datagrid/search` entry exports `RDGSearchProvider`,
|
|
217
233
|
`RDGSearchBar`, `RDGSearchTarget`, and their prop types. The explicit stylesheet
|
|
218
|
-
fallbacks
|
|
219
|
-
`@geovi/the-datagrid/
|
|
234
|
+
fallbacks include `@geovi/the-datagrid/index.css`,
|
|
235
|
+
`@geovi/the-datagrid/base.css`, every documented default/amber/blue/green/pink
|
|
236
|
+
light/dark theme path, and `@geovi/the-datagrid/search/style.css`.
|
|
220
237
|
|
|
221
238
|
The optional `@geovi/the-datagrid/components` entry is the one-import choice for
|
|
222
239
|
mixed contextual controls. It exports `RDGProvider`, `RDGTarget`,
|
|
@@ -250,9 +267,9 @@ number comparison/range operators, and date/time comparison/range operators.
|
|
|
250
267
|
Operator definitions can opt into empty-value filtering, initialize a value
|
|
251
268
|
when selected, or disable the editor for value-free operations.
|
|
252
269
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
`eq`
|
|
270
|
+
Unseeded `bool` and `boolean` filters default to `eq`, matching their shipped
|
|
271
|
+
operator registry. Other defaults are `contains` for strings, `gte` for
|
|
272
|
+
numbers, `eq` for selects, and `afterOrOn` for date/time values.
|
|
256
273
|
|
|
257
274
|
Custom filter types are shallow-merged by registry key with the built-ins:
|
|
258
275
|
|
|
@@ -640,11 +657,13 @@ fallbacks, omits columns with `hideable={false}`, and does not allow the final
|
|
|
640
657
|
visible column to be hidden. Button state is exposed through `aria-pressed`; no
|
|
641
658
|
eye icon or parallel application visibility state is required.
|
|
642
659
|
|
|
643
|
-
Set `visible: false
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
660
|
+
Set controlled `visible: false`, uncontrolled `defaultVisible: false`, or the
|
|
661
|
+
legacy `defaultHidden: true` alias on a column that should start hidden.
|
|
662
|
+
`hideable: false` disables menu/toolbar toggles but does not block the
|
|
663
|
+
imperative API. `onColumnVisibleChange({ column, visible })` receives every
|
|
664
|
+
effective proposal. A declarative `visible` value remains authoritative until
|
|
665
|
+
the parent applies that proposal; otherwise the grid persists the change in
|
|
666
|
+
its own runtime state.
|
|
648
667
|
|
|
649
668
|
The default title is a level-two heading that labels the toolbar region. The
|
|
650
669
|
toggle group keeps its `ariaLabel`, and the description is associated with both
|
|
@@ -763,11 +782,12 @@ Note: this is a curated overview. For the complete contract, refer to the export
|
|
|
763
782
|
|
|
764
783
|
### Core
|
|
765
784
|
|
|
766
|
-
| Prop | Type
|
|
767
|
-
| ------------ |
|
|
768
|
-
| `idProperty` | `string`
|
|
769
|
-
| `columns` | `TypeColumns`
|
|
770
|
-
| `
|
|
785
|
+
| Prop | Type | Default | Description |
|
|
786
|
+
| ------------ | ------------------- | -------- | ------------------------------------------------------------ |
|
|
787
|
+
| `idProperty` | `string` | `"id"` | Property name used as unique row identifier; JSX may omit it |
|
|
788
|
+
| `columns` | `TypeColumns` | required | Column definitions |
|
|
789
|
+
| `groups` | `TypeColumnGroup[]` | `[]` | Stacked and nested column-header descriptors |
|
|
790
|
+
| `dataSource` | `TypeDataSource` | required | Data source (array, function, or promise) |
|
|
771
791
|
|
|
772
792
|
### Display
|
|
773
793
|
|
|
@@ -807,17 +827,41 @@ custom cell metadata. That callback value preserves upstream’s raw shape:
|
|
|
807
827
|
|
|
808
828
|
### Columns
|
|
809
829
|
|
|
810
|
-
| Prop
|
|
811
|
-
|
|
|
812
|
-
| `columnOrder`
|
|
813
|
-
| `
|
|
814
|
-
| `
|
|
815
|
-
| `
|
|
816
|
-
| `
|
|
817
|
-
| `
|
|
818
|
-
| `
|
|
819
|
-
| `
|
|
820
|
-
| `
|
|
830
|
+
| Prop | Type | Default | Description |
|
|
831
|
+
| -------------------------- | ------------------------------- | ------- | ------------------------------------------------------------------------------- |
|
|
832
|
+
| `columnOrder` | `string[]` | - | Controlled ordered array of column ids/names |
|
|
833
|
+
| `defaultColumnOrder` | `string[]` | columns | Initial order for grid-owned ordering |
|
|
834
|
+
| `onColumnOrderChange` | `(order: string[]) => void` | - | Receives reorder proposals; optional for grid-owned ordering |
|
|
835
|
+
| `onColumnVisibleChange` | `({ column, visible }) => void` | - | Receives controlled or uncontrolled visibility proposals |
|
|
836
|
+
| `reorderColumns` | `boolean` | `true` | Disable user drag reordering |
|
|
837
|
+
| `allowGroupSplitOnReorder` | `boolean` | `true` | Allow reordering to split one logical group into visual segments |
|
|
838
|
+
| `resizable` | `boolean` | `true` | Enable header resize handles |
|
|
839
|
+
| `columnDefaultWidth` | `number` | `150` | Root fallback when a column has no width/defaultWidth |
|
|
840
|
+
| `columnMinWidth` | `number` | `40` | Root fallback when a column has no minWidth |
|
|
841
|
+
| `columnMaxWidth` | `number \| null` | `null` | Root fallback when a column has no maxWidth |
|
|
842
|
+
| `shareSpaceOnResize` | `boolean` | `false` | Resize the adjacent visible column in the opposite direction |
|
|
843
|
+
| `columnResizeHandleWidth` | `number` | `24` | Header resize pointer-target width |
|
|
844
|
+
| `columnResizeProxyWidth` | `number` | `5` | Deferred resize-proxy width |
|
|
845
|
+
| `liveColumnResize` | `boolean` | `false` | Resize rendered geometry during drag; callbacks remain completion-only |
|
|
846
|
+
| `onColumnResize` | `(info, context) => void` | - | Reports each proposed width/flex and reserved viewport width |
|
|
847
|
+
| `onBatchColumnResize` | `(entries, context) => void` | - | Reports one coherent callback for every resize transaction |
|
|
848
|
+
| `enableColumnAutosize` | `boolean` | `true` | Estimate widths from a bounded row sample when no numeric width is supplied |
|
|
849
|
+
| `skipHeaderOnAutoSize` | `boolean` | `false` | Skip header text when estimating an automatic width |
|
|
850
|
+
| `showColumnMenuTool` | `boolean` | `true` | Show sort, visibility, auto-size, and fit actions in the accessible column menu |
|
|
851
|
+
|
|
852
|
+
When `columnOrder` is omitted, `defaultColumnOrder` seeds grid-owned ordering
|
|
853
|
+
and drag changes persist even without a callback. When `columnOrder` is
|
|
854
|
+
supplied, it is authoritative: `onColumnOrderChange` receives the proposal and
|
|
855
|
+
the display changes only after the parent returns it. The same ownership rule
|
|
856
|
+
applies to `column.visible` versus `defaultVisible`/`defaultHidden`.
|
|
857
|
+
|
|
858
|
+
Column sizing precedence is controlled `width`, column `defaultWidth` and
|
|
859
|
+
`minWidth`/`maxWidth`, then the root fallbacks. An uncontrolled flex column
|
|
860
|
+
retains flex ownership by default; set `column.keepFlex: false` to convert it to
|
|
861
|
+
fixed sizing after a no-share resize. Shared-space resize preserves the adjacent
|
|
862
|
+
pair's total width and handles fixed/fixed, flex/flex, and mixed pairs.
|
|
863
|
+
Controlled `width` and `flex` values remain prop-owned while both resize
|
|
864
|
+
callbacks receive the proposal.
|
|
821
865
|
|
|
822
866
|
Set `column.locked` to `"start"` or `"end"` to keep it visible at that
|
|
823
867
|
horizontal edge; `true` is the Inovua-compatible alias for `"start"`. Locked
|
|
@@ -844,15 +888,21 @@ those compatibility metrics.
|
|
|
844
888
|
|
|
845
889
|
### Filtering
|
|
846
890
|
|
|
847
|
-
| Prop
|
|
848
|
-
|
|
|
849
|
-
| `enableFiltering`
|
|
850
|
-
| `filterValue`
|
|
851
|
-
| `defaultFilterValue`
|
|
852
|
-
| `onFilterValueChange`
|
|
853
|
-
| `filterTypes`
|
|
854
|
-
| `enableColumnFilterContextMenu`
|
|
855
|
-
| `
|
|
891
|
+
| Prop | Type | Default | Description |
|
|
892
|
+
| --------------------------------------- | ---------------------------------------------- | ------------------ | --------------------------------------------------------- |
|
|
893
|
+
| `enableFiltering` | `boolean` | inferred | Explicitly show or hide the filter row |
|
|
894
|
+
| `filterValue` | `TypeFilterValue` | - | Controlled display state; data ownership remains external |
|
|
895
|
+
| `defaultFilterValue` | `TypeFilterValue` | - | Uncontrolled initial state and local filtering input |
|
|
896
|
+
| `onFilterValueChange` | `(value: TypeFilterValue) => void` | - | Fired on filter change |
|
|
897
|
+
| `filterTypes` | `TypeFilterTypes` | built-in registry | Extend or override filter types and operators |
|
|
898
|
+
| `enableColumnFilterContextMenu` | `boolean` | `true` | Operator, activation, Clear, and Clear All menu |
|
|
899
|
+
| `scrollTopOnFilter` | `boolean` | `true` | Reset vertical scroll after a filter commits |
|
|
900
|
+
| `renderColumnFilterContextMenu` | `TypeRenderColumnFilterContextMenu` | - | Render a custom operator menu with grid/cell context |
|
|
901
|
+
| `columnFilterContextMenuAlignPositions` | `string[]` | built-in fallbacks | Configure custom/operator menu alignment candidates |
|
|
902
|
+
| `columnFilterContextMenuConstrainTo` | `boolean \| HTMLElement \| string \| function` | `true` | Supply the custom menu constraint target |
|
|
903
|
+
| `columnFilterContextMenuPosition` | `string` | `"absolute"` | Supply the custom menu positioning mode |
|
|
904
|
+
| `updateMenuPositionOnScroll` | `boolean` | `true` | Request custom menu repositioning while scrolling |
|
|
905
|
+
| `filteredRowsCount` | `(count: number) => void` | - | Reports filtered row count |
|
|
856
906
|
|
|
857
907
|
For Inovua 5.10.2 compatibility, filter-row visibility and local array
|
|
858
908
|
transformation are separate decisions. With no explicit `enableFiltering`, a
|
|
@@ -869,13 +919,42 @@ Disable are explicit menu actions, and Clear All emits one aggregate update.
|
|
|
869
919
|
|
|
870
920
|
### Sorting
|
|
871
921
|
|
|
872
|
-
| Prop | Type | Default
|
|
873
|
-
| ------------------------- | ------------------------------ |
|
|
874
|
-
| `sortInfo` | `TypeSortInfo` | -
|
|
875
|
-
| `defaultSortInfo` | `TypeSortInfo` | -
|
|
876
|
-
| `onSortInfoChange` | `(info: TypeSortInfo) => void` | -
|
|
877
|
-
| `
|
|
878
|
-
| `
|
|
922
|
+
| Prop | Type | Default | Description |
|
|
923
|
+
| ------------------------- | ------------------------------ | ------------- | -------------------------------------------------------------- |
|
|
924
|
+
| `sortInfo` | `TypeSortInfo` | - | Controlled sort state |
|
|
925
|
+
| `defaultSortInfo` | `TypeSortInfo` | - | Uncontrolled initial sort |
|
|
926
|
+
| `onSortInfoChange` | `(info: TypeSortInfo) => void` | - | Fired on sort change |
|
|
927
|
+
| `sortable` | `boolean` | `true` | Root sorting switch; `column.sortable` can override it |
|
|
928
|
+
| `allowUnsort` | `boolean` | `true` | Allow a single sort to return to “unsorted” |
|
|
929
|
+
| `defaultSortingDirection` | `"asc" \| "desc"` | `"asc"` | Default sort direction |
|
|
930
|
+
| `sortFunctions` | `TypeSortFunctions` | date registry | Comparator registry addressed by `column.type` |
|
|
931
|
+
| `renderSortTool` | `TypeRenderSortTool` | built-in icon | Root sort-indicator renderer; `column.renderSortTool` wins |
|
|
932
|
+
| `scrollTopOnSort` | `boolean \| "always"` | `true` | Reset vertical scroll on sort, never, or on every data refresh |
|
|
933
|
+
|
|
934
|
+
An object-valued `sortInfo` is single-sort mode. An array-valued sort state is
|
|
935
|
+
persistent multi-sort mode, including when the array contains zero or one
|
|
936
|
+
descriptor; ordinary click, Enter, Space, header-menu, mobile, and imperative
|
|
937
|
+
sort actions retain that array shape without requiring Shift. Descriptor order
|
|
938
|
+
is sort priority, and retoggling a descriptor preserves its position until it
|
|
939
|
+
is removed.
|
|
940
|
+
|
|
941
|
+
Local sorting uses `column.sort` first, then a descriptor `fn`, a
|
|
942
|
+
`sortFunctions[column.type]` registry entry, and finally the built-in
|
|
943
|
+
`number`/`date`/`string` comparator. A named column comparator receives
|
|
944
|
+
`(value1, value2, column, data1, data2, sortInfo)`. An id-only column receives
|
|
945
|
+
the complete rows as `value1` and `value2`. Controlled `sortInfo` remains
|
|
946
|
+
externally owned and is not applied again to local array order.
|
|
947
|
+
|
|
948
|
+
Migration notes for the completed Inovua sorting contract:
|
|
949
|
+
|
|
950
|
+
- Previous releases inferred numeric ordering when both values were
|
|
951
|
+
number-like. Untyped columns now use Inovua's string comparator; declare
|
|
952
|
+
`type: "number"` (or provide a comparator) for numeric ordering.
|
|
953
|
+
- Shift no longer changes a single descriptor into multi-sort mode. Initialize
|
|
954
|
+
`sortInfo` or `defaultSortInfo` as an array to opt into persistent multi-sort.
|
|
955
|
+
- `TypeSingleSortInfo.fn`, `column.sort`, and registered sort functions now
|
|
956
|
+
expose their exact comparator argument lists while retaining Inovua's
|
|
957
|
+
`number | boolean` result compatibility.
|
|
879
958
|
|
|
880
959
|
### Selection
|
|
881
960
|
|
|
@@ -944,6 +1023,18 @@ The stable `TypeComputedProps` ref exposes these editing methods and fields:
|
|
|
944
1023
|
| `isInEdit.current` | Exposes the upstream lifecycle edit flag. |
|
|
945
1024
|
| `currentEditCompletePromise.current` | Tracks the current completion callback promise. |
|
|
946
1025
|
|
|
1026
|
+
It also exposes behavior-backed column-state methods:
|
|
1027
|
+
|
|
1028
|
+
| Member | Behavior |
|
|
1029
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
1030
|
+
| `setColumnVisible(column, visible)` | Uses the same controlled/uncontrolled ownership and callback path as the built-in menu and optional toolbar. |
|
|
1031
|
+
| `setColumnOrder(order)` | Applies an uncontrolled order or emits a controlled proposal without mutating consumer state. |
|
|
1032
|
+
| `setColumnSizes(action)` / `setColumnFlexes(action)` | Replace grid-owned width/flex maps; declarative `width`/`flex` values remain authoritative. |
|
|
1033
|
+
| `onBatchColumnResize(entries, context?)` | Applies a width/flex transaction and emits per-column plus batch completion callbacks. |
|
|
1034
|
+
| `setColumnSizeAuto(id, skipHeader?)` | Deterministically auto-sizes one resizable visible column. |
|
|
1035
|
+
| `setColumnsSizesAuto(config?)` | Auto-sizes selected or all resizable visible columns as one batch. |
|
|
1036
|
+
| `setColumnSizesToFit()` | Fits resizable visible columns to the viewport while honoring min/max bounds. |
|
|
1037
|
+
|
|
947
1038
|
Completion is session-safe: an older async completion settling cannot clear or
|
|
948
1039
|
navigate a newer edit. The editor is already stopped when `onEditComplete`
|
|
949
1040
|
runs; rejecting its Promise leaves it stopped and suppresses keyboard
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
the-datagrid provides a compatibility layer for the public Community API of
|
|
4
|
+
`@inovua/reactdatagrid-community@5.10.2`. Inovua ReactDataGrid is Copyright
|
|
5
|
+
INOVUA TRADING and is distributed under the MIT License. Its license is
|
|
6
|
+
available in the upstream package and repository:
|
|
7
|
+
https://github.com/inovua/reactdatagrid
|
|
8
|
+
|
|
9
|
+
This notice documents API provenance. the-datagrid's implementation and
|
|
10
|
+
shadcn/Tailwind presentation are maintained independently.
|