Skip to content

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

Closed
orzyyyy wants to merge 4 commits intoComfy-Org:mainfrom
0-0-a:fix-3559
Closed

fix: preserve selected filter values state with reactive Set ref#3583
orzyyyy wants to merge 4 commits intoComfy-Org:mainfrom
0-0-a:fix-3559

Conversation

@orzyyyy
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/components/searchbox/NodeSearchFilter.vue Outdated
Comment thread src/components/searchbox/NodeSearchFilter.vue Outdated
@DrJKL DrJKL closed this Nov 18, 2025
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.

3 participants