-
Notifications
You must be signed in to change notification settings - Fork 94
fix(datagrid): keep filter overlay open while typing #782
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 @dtsanevmw,
Thank you, 🤖 Clarity Release Bot |
25943c7 to
385bd28
Compare
4846105 to
6ed9b28
Compare
6ed9b28 to
b014fc8
Compare
kevinbuhmann
left a comment
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 think fix(datagrid): keep filter overlay open while typing would be a better PR title/commit message.
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 looked into this a bit more. I think this solution works, but it's "hacky" and likely to be difficult to maintain.
The root issue that the height of the datagrid is sometimes changed when filtering. It's inconsistent because it happens on the page linked in #355 but not in our Storybook. We should fix that bug instead so that the scroll doesn't happen in the first place instead of working around one bug to fix another.
00b3cd6 to
433c241
Compare
|
I got back to that PR and basically we have 2 states of the datagrid. If we have pagination and page size ( items per page ) then we automatically set a height for the whole datagrid and that issue is not appearing. Although when there is no pagination and page size then we don't set that and basically the height of the datagrid can change based on the items inside. So now with the update when we don't have a page size we listen for filter changes and stop listening for scroll events while aligning the popover to it's new position. |
0891e0e to
6c81d79
Compare
6c81d79 to
c100ba2
Compare
|
This PR introduces visual changes: 5b29bb7 |
c100ba2 to
ec8a2d3
Compare
|
Will wait the popover refactor #1435 to be merged |
Removing the scroll listener right before filter change resolves the issue. Also realigning it with the correct position when the height is changed.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When typing in a filter overlay and the items in a datagrid get filtered in lower number, then the height of datagrid changes and depending of the position in the page it triggers a scroll event which closes the filter.
Issue Number: CDE-8, #355
What is the new behavior?
No longer closes on typing.
Does this PR introduce a breaking change?
Other information