feat(DataTable): support between filter in DataTable.Filters UI#223
Merged
feat(DataTable): support between filter in DataTable.Filters UI#223
DataTable.Filters UI#223Conversation
commit: |
65959d2 to
e991156
Compare
DataTable.Filters UI
DataTable.Filters UIDataTable.Filters UI
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UI + value-shaping support for the between operator in DataTable.Filters so numeric and temporal filters can be edited/added as ranges.
Changes:
- Adds
betweento numeric/temporal operator selector and introduces a sharedBetweenInputGroupUI. - Updates add-filter draft validation/submission to support two-input range entry.
- Extends Numeric/Temporal filter chip editors and adds tests + i18n labels for range fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/core/src/components/data-table/toolbar.tsx | Adds between operator UI/logic for Add Filter popover and chip editors; formats between values for chip labels. |
| packages/core/src/components/data-table/toolbar.test.tsx | Adds regression tests for numeric/date between chip editing behavior. |
| packages/core/src/components/data-table/i18n.ts | Adds labels for “From/To” and “Min/Max” used by the new range inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace synchronous getAllByDisplayValue with findAllByDisplayValue to avoid flaky tests when popover content renders via portal on next tick.
Add aria-label attributes to each input so screen readers can distinguish the min/max (from/to) fields.
Return undefined when either bound is missing in toAddFilterSubmittedValue, preventing partial range objects that would cause GraphQL validation errors.
Add validity checks and disable Apply button when either bound is invalid, consistent with TemporalFilterEditor behavior. Update test to expect no addFilter call when only one bound is set.
Contributor
Author
|
/review |
- Fix TemporalFilterEditor.canCommit to reject partial ranges (matching NumericFilterEditor)
- Fix TemporalFilterEditor.handleCommit to use || guard and build complete {min, max} object
- Fix isAddFilterDraftValueValid to require both bounds non-empty for between operator
DataTable.Filters UIDataTable.Filters UI
davedc
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Screen shots
Number
Time
Date
DateTime