Skip to content

fix(applet): preserve active component when filtering#1065

Open
skirtles-code wants to merge 1 commit intovuejs:mainfrom
skirtles-code:filter-selection-jumping
Open

fix(applet): preserve active component when filtering#1065
skirtles-code wants to merge 1 commit intovuejs:mainfrom
skirtles-code:filter-selection-jumping

Conversation

@skirtles-code
Copy link
Contributor

@skirtles-code skirtles-code commented Mar 17, 2026

Fixes #1062.

When filtering using the Find components... input, the selected component gets reset every time there's a re-render in the target application.

I've adjusted the logic to preserve the old selection whenever possible. The selection is only reset if the previously selected component is no longer available. This doesn't just apply to re-renders, it also applies to changing the search value.

There's one specific use case I was particularly keen to improve. If you use the search box to find a component, you can select it and then clear the search value. The selection is now preserved, allowing you to see exactly where that component is in the tree. To get this all working smoothly I also needed to adjust the logic for automatically expanding nodes.

Most of the logic I needed already existed elsewhere in the same file, so I've introduced some helpers to avoid duplicating that logic.

@netlify
Copy link

netlify bot commented Mar 17, 2026

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit bd700f3
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/69b9d8ec51b8250008573aa4

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

@vue/devtools-applet

npm i https://pkg.pr.new/@vue/devtools-applet@1065

@vue/devtools-core

npm i https://pkg.pr.new/@vue/devtools-core@1065

@vue/devtools

npm i https://pkg.pr.new/@vue/devtools@1065

@vue/devtools-api

npm i https://pkg.pr.new/@vue/devtools-api@1065

@vue/devtools-kit

npm i https://pkg.pr.new/@vue/devtools-kit@1065

@vue/devtools-electron

npm i https://pkg.pr.new/@vue/devtools-electron@1065

@vue/devtools-shared

npm i https://pkg.pr.new/@vue/devtools-shared@1065

@vue/devtools-ui

npm i https://pkg.pr.new/@vue/devtools-ui@1065

vite-plugin-vue-devtools

npm i https://pkg.pr.new/vite-plugin-vue-devtools@1065

commit: bd700f3

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.

find component is auto select the first one even select other component

1 participant