[IMP] devtools: highlight component on select

Small imp to highlight a component when it gets selected in the tree to
provide better visual feedback to the user when he is using arrow keys
navigation.
This commit is contained in:
Julien Carion (juca)
2023-10-24 16:10:43 +02:00
committed by Géry Debongnie
parent 166cada8ff
commit db3499f5e5
@@ -147,6 +147,7 @@ export const store = reactive({
} }
component.selected = true; component.selected = true;
highlightChildren(component); highlightChildren(component);
this.highlightComponent(path);
const details = await evalFunctionInWindow( const details = await evalFunctionInWindow(
"getComponentDetails", "getComponentDetails",
[component.path], [component.path],
@@ -334,7 +335,6 @@ export const store = reactive({
setSearchIndex(index) { setSearchIndex(index) {
this.componentSearch.searchIndex = index; this.componentSearch.searchIndex = index;
this.selectComponent(this.componentSearch.searchResults[index]); this.selectComponent(this.componentSearch.searchResults[index]);
this.highlightComponent(this.componentSearch.searchResults[index]);
}, },
// Replace the (...) content of a getter with the value returned by the corresponding get method // Replace the (...) content of a getter with the value returned by the corresponding get method