Skip to content
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 FilterLiveSearch reset button does not reset the value #9149

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jul 31, 2023

Closes #9106

FilterLiveSearch used react-admin's <Form>, which did too many things and caused the bug. Switching to a simple form powered by useForm fixes the issue.

I had to augment useList to make a real-life filterable list and unit test <FilterLiveSearch> .

@@ -21,70 +21,6 @@ const UseList = ({
};

describe('<useList />', () => {
it('should filter string data based on the filter props', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these tests further down to group them in the describe('filter') group, I didn't remove or modify them

);
});

it('should apply the q filter as a full-text filter', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only new test

@fzaninotto fzaninotto added the RFR Ready For Review label Jul 31, 2023
@fzaninotto fzaninotto merged commit 507109b into master Aug 1, 2023
8 checks passed
@fzaninotto fzaninotto deleted the fix-filterlivesearch-reset branch August 1, 2023 08:10
@fzaninotto fzaninotto added this to the 4.12.4 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FilterLiveSearch does not clear its value
2 participants