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

Using ReferenceInput as a Filter in a List view causes an unrecoverable state when filtering a non-existent value. #10387

Open
djaszak opened this issue Nov 27, 2024 · 1 comment

Comments

@djaszak
Copy link

djaszak commented Nov 27, 2024

Is your feature request related to a problem? Please describe.
When using the <ReferenceInput /> as a filter in any <List /> view and the set the filtered value, to one not existing in the API, we are in a state where no object is in the filter selected. This leads to a state where I need to remove and add the filter. This cannot only happen, when manually setting the filtered value in the URL. I first encountered this problem, when a user of my app deleted the object he was previously filtering and then came back to <List />.

Describe the solution you'd like
I have some solutions in mind which could be up to discussion.

  1. Reset the according filter when it tries to filter for a value which is non-existent
  2. Provide a reset filter button even if no object is shown in the dropdown, but one is set in the filter of the url
  3. Provide a reset all filters button in the toolbar, if the filter tries to filter for an object which is not present

Describe alternatives you've considered
For the moment, I remove and add the filter again, which is not clear especially for users that do not realize the root of the problem.

Additional context
Image
I reproduced the behaviour in the sandbox, without touching any code, by firstly selecting the filter, then selecting an object which is present and afterwards setting the id to a value not being present in the DB.

@fzaninotto
Copy link
Member

Solution 3 has already been implemented in 5.2.0. Can you check that it solves your issue?

#10184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants