Skip to content

fix: preserve selected filter values state with reactive Set ref #3583

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

orzyyyy
Copy link

@orzyyyy orzyyyy commented Apr 23, 2025

Close #3559

  • Prevent resetting existedFilterValue on re-render by wrapping in ref.
  • Maintain filter selection history using Vue's reactivity system.

┆Issue is synchronized with this Notion page by Unito

@orzyyyy orzyyyy requested a review from a team as a code owner April 23, 2025 13:36
Copy link
Contributor

@webfiltered webfiltered left a comment

Choose a reason for hiding this comment

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

Once added, filters can never be removed from the existing filters set (so add, remove, add again will fail silently).

Would be good to rename it to existingFilters.

@orzyyyy
Copy link
Author

orzyyyy commented Apr 23, 2025

However, when I click the remove icon, the filter is properly removed. My operation steps were: add, remove, then add again. I'm not sure if this kind of error handling is required in this scenario.

Copy link
Contributor

@webfiltered webfiltered left a comment

Choose a reason for hiding this comment

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

Edit: Just tested - it doesn't actually resolve the issue. Can add a filter for e.g. Comfy Core twice.

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

Successfully merging this pull request may close these issues.

[Bug | Not very serious ]: The filter in the sidebar can add the same filter item repeatedly.
2 participants