Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/devtools/views/Components/TreeContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ function reduceSearchState(store: Store, state: State, action: Action): State {
}

// Changes in search index or typing should override the selected element.
if (
searchIndex !== prevSearchIndex ||
searchText.indexOf(prevSearchText) === 0
) {
const didAddToSearchText =
searchText.length > prevSearchText.length &&
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This line is new.

searchText.indexOf(prevSearchText) === 0;
if (searchIndex !== prevSearchIndex || didAddToSearchText) {
if (searchIndex === null) {
selectedElementIndex = null;
selectedElementID = null;
Expand Down