-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Fix filters with complex object are not removed from the UI #9898
Fix filters with complex object are not removed from the UI #9898
Conversation
When filters with a complex object as defaultValue the "empty value" was not considered empty by the UI. This commit ensure we don't display empty filters on the UI. Refs: marmelab#9893
I reviewed the logic around the reset form behavior a bit. In my opinion, it could be simplified, but I don't want to risk removing code that seems overkill. The changes I made in this PR aim to reduce breaking changes and simply address the UI issue that was originally reported. |
Thanks for the PR! Would you mind adding a test for it? |
Add test to ensure correction. Refs: marmelab#9893
Tests added |
Thanks for your work 💪 Waiting for another review |
I'll review the failing test |
I added a fix (to fix the test :x). I tested on my local setup, with a real chrome & firefox (managed by cypress). Was working properly. From my XP, those failing tests comes from CPU perfs and bad starting conditions for the test. I added a condition where we wait for an element to be present (which is safe than waiting for an element that is not present). I also removed a |
@@ -9,10 +9,10 @@ describe('Mobile UI', () => { | |||
}); | |||
|
|||
describe('Infinite Scroll', () => { | |||
it.only('should load more items when scrolling to the bottom of the page', () => { | |||
it('should load more items when scrolling to the bottom of the page', () => { |
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.
😱
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!
When filters with a complex object as defaultValue the "empty value" was not considered empty by the UI. This commit ensure we don't display empty filters on the UI.
Refs: #9893