You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Refactor filtering system to use discriminated unions for filter values
- Updated filter value structure to use a discriminated union for better type safety.
- Consolidated filter handling into a single onFilterChange callback.
- Removed deprecated multiSelect, text, and people filter props from IOGridDataGridProps.
- Introduced a new date filter type and updated related documentation.
- Enhanced client-side data processing to support new filter structure.
- Removed the title prop from OGrid components, encouraging external rendering.
- Updated all relevant components and utilities to align with the new filtering approach.
- Bumped package versions to 1.6.0 across all implementations.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,49 @@
2
2
3
3
All notable changes to OGrid will be documented in this file.
4
4
5
+
## [1.6.0] – 2026-02-09
6
+
7
+
### BREAKING CHANGES
8
+
9
+
-**FilterValue discriminated union** — `IFilters` values are now typed discriminated unions instead of raw values. All filter values must specify their `type`:
-**Unified filter API on DataGridTable** — `IOGridDataGridProps` now uses `filters: IFilters` + `onFilterChange: (key, value) => void` instead of the 8 split filter props (`multiSelectFilters`, `textFilters`, `peopleFilters`, `dateFilters` and their onChange handlers). This does NOT affect `OGrid` consumers — only direct `DataGridTable` users.
19
+
20
+
-**Grouped `useDataGridState` returns** — The hook's return object is now organized into 6 logical groups instead of 42 flat properties:
-**Removed deprecated props** — `title`, `gap`, and `columnChooser` removed from `OGridLayout`. Consumers should render titles outside `<OGrid>` and use `toolbarEnd` for column chooser placement.
29
+
30
+
-**Removed `toDataGridFilterProps`** — This helper was replaced by the unified filter API; use `filters`/`onFilterChange` directly.
31
+
32
+
### Added
33
+
34
+
-**`processClientSideData` utility** — Pure function extracted from `useOGrid` for client-side filtering and sorting. Can be used independently for custom data processing pipelines.
35
+
-**Wildcard re-exports** — All three UI packages now use `export * from '@alaarab/ogrid-core'` instead of cherry-picked re-export lists. Every core type is automatically available from any UI package import.
36
+
-**Grouped state sub-interfaces** — `DataGridLayoutState`, `DataGridRowSelectionState`, `DataGridEditingState`, `DataGridCellInteractionState`, `DataGridContextMenuState`, `DataGridViewModelState` are exported for consumers building custom grid wrappers.
-**Phase 2: Descriptor-to-component pattern** — All three UI packages now use the full suite of 6 core helpers (`getCellRenderDescriptor`, `buildInlineEditorProps`, `buildPopoverEditorProps`, `getCellInteractionProps`, `resolveCellDisplayContent`, `resolveCellStyle`). Each package's `renderCellContent` is now a thin ~50-line mapping from descriptors to framework-specific JSX.
@@ -214,15 +214,14 @@ Opus is the **orchestrator**. For multi-step tasks, break the work into well-sco
214
214
-[ ] State logic stays in core hooks — UI packages should only add view-layer code.
215
215
-[ ] If the same pattern appears in 2+ UI packages, consider a shared factory or headless component.
216
216
217
-
## Remaining Duplication (Future Work)
217
+
## View Layer Architecture (Phase 2 Complete)
218
218
219
-
State and behavior are centralized in core. The remaining triplication is in the **view layer** of DataGridTable:
219
+
State and behavior are centralized in core. Each UI package's `renderCellContent`is a thin ~50-line mapping from core-computed descriptors to framework-specific JSX, using 6 core helpers: `getCellRenderDescriptor`, `buildInlineEditorProps`, `buildPopoverEditorProps`, `getCellInteractionProps`, `resolveCellDisplayContent`, `resolveCellStyle`.
220
220
221
-
| What's shared | What's triplicated|
221
+
| What's in core | What's per-framework|
222
222
|---|---|
223
223
|`useDataGridState`, all sub-hooks, types, utils | Table primitives (Fluent DataGrid vs MUI Table vs native `<table>`) |
**Next step (Phase 2):** Use `getCellRenderDescriptor` in all three DataGridTable implementations so cell rendering is "map descriptor to component" instead of reimplementing the booleans and callbacks. This would make each DataGridTable a thin mapping from descriptors to framework-specific primitives.
227
+
|`processClientSideData`| CSS/styling (CSS modules vs MUI sx) |
0 commit comments