-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] Lower filter debounce delay #9712
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
66c12f4
feat: make SUBMIT_FILTER_STROKE_TIME into a prop
romgrk 3bdf00c
feat
romgrk 9795860
feat
romgrk 0d8babc
lint
romgrk 776062d
lint
romgrk 67fe5b4
build: docs:api
romgrk db2c5d9
refactor
romgrk 8b6e63e
lint
romgrk 40ae023
Merge branch 'master' into feat-quick-filter-delay
romgrk 01f92ac
refactor
romgrk 810a028
lint
romgrk 5d3c395
lint
romgrk 6fe923f
lint
romgrk 6a1ad56
fix: input re-type bug
romgrk a6cdda2
ci: run
romgrk 9185ab2
fix: add effect back
romgrk 08315bf
lint
romgrk 5b52b74
Merge branch 'master' into feat-quick-filter-delay
romgrk 9bd9dee
Merge branch 'master' into feat-quick-filter-delay
romgrk 5db6cbb
build
romgrk a42ae12
fix: filter panel re-type bug
romgrk f1d05aa
fix
romgrk e6abe96
lint
romgrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this effect was covering the use case with a controlled filter model, where the filter model could change while the user has the filter panel open.
Without this effect, the filter input will be out of sync with the actual filter model:
With effect: https://codesandbox.io/s/gracious-khayyam-2xqw3n?file=/demo.tsx
Without effect: https://codesandbox.io/s/dreamy-glitter-h8h4yj?file=/demo.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've adapted the effect to respond to the model changes specifically, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll apply to the other equivalent components if it LGTY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The effect was also making sure the value is correctly synced with header filter (which is another rendered instance of
GridFilterInputValue
), removing it also impacted it too, as it's actually fromInput but it still needs to be synced 😄Before:
After:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh good catch, there's so many parts to this thing ^^
I've pushed a fix for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, works as expected now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romgrk It had another aspect which I missed catching 😄
Since the rendering of
GridFilterInputValue
is being done fromGridHeaderFilterCell
, the item change is incorrectly reflected.I am thinking of disabling this optimization (
fromInput
) for the headerFilters, let me know if you have better ideas.