-
Notifications
You must be signed in to change notification settings - Fork 766
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
Search - 'Clear all' is not resetting the dropdowns #12821
Comments
@radinamatic - opening a follow-up issue for that comment, so that we can keep track of it. |
I'd like to take on this issue. Please assign it to me. Proposed Solution: Extend the State Reset Logic: I will ensure that when the 'Clear All' button is clicked, all state variables associated with the dropdown filters (Language, Level, Channel, and Accessibility) are explicitly reset to their default values (e.g., null or default options). This can be achieved by enhancing the existing state management logic, potentially in the useState . Trigger Dropdown Re-rendering: I will make sure to trigger a re-render for all affected dropdown components when the state is reset to guarantee that the visual state of the dropdowns reflects the cleared state. This will prevent any stale UI behavior and align with the behavior for other filters. UI Consistency Check: I plan to introduce a unit test or an automated UI test to verify that when the 'Clear All' button is pressed, all dropdowns are effectively reset, alongside any search results or other filters, maintaining a consistent user experience. |
Hi @SukhvirKooner, thanks for volunteering! This issue is not open for contribution. There are contributing opportunities in three repositories. See the contributing guidelines including links to issues suitable for contribution for each repository here:
You can also see the list of unassigned "help wanted" or "good first issue" issues across all repositories. |
Hi @pcenov could you confirm if this issue still persist. There was a big internal refactor in KSelect for v5 that broke it and it should be fix now. |
Great news: the original issue is not replicable on the latest assets from the develop branch! 👍🏽 💯 🥳 All previously applied filters in the Library search are now properly cleared by the Clear all. Closing as not extant anymore. |
@nucleogenesis I did notice one thing while testing over the weekend, and I wanted to investigate more but then the ⛈️ happened:
Clear all
button does clear the displayed search results and the filter applied for the search actions performed using Keywords, Categories, Activities and the Show resources options.However, it does not clear the applied filters for any of the dropdown options (Language, Level, Channel, Accessibility). Search results are cleared, but the previously applied filter apparently stays visible, but not actually applied anymore, and the user needs to clear them manually. This can be confusing and we should force them cleared as for the other filtering options in the sidebar.
clear-dropdown.mp4
Originally posted by @radinamatic in #12745 (comment)
The text was updated successfully, but these errors were encountered: