-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[tree] add extra options to the tree search input #5566
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buttons looks OK and useful
Question 1: when the tree is collapse, the search does not expand the tree to show the result
Question 2: The search is navigating through each tree item when the search does not find anything, should it stay on the current selected tree item when there is no tree item matching the search !
Also, when reaching the last item, it does not loop back , as when an item is found
That is the current behavior of the tree search and consistent with vscode. Only the visible part of the tree is searchable.
When there is a match you'll see orange highlighting, if there is no match this highlighting is not present.
I am able to see the loop back to the first item. |
@lmcbout after clarifying with me face-to-face, I'll take a look at why the explorer changes selection when there are no results and |
bb321b4
to
9424d05
Compare
@lmcbout I updated the PR so that only if there are currently highlighted items (matches) do we enable the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, the "Previous" button is searching in the same direction as the "Next" button
For the search with an invalid search option, it works fine.
9424d05
to
eae67a2
Compare
I fixed the issue, the original implementation was calling the incorrect method for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @vince-fugnitto
- added extra `showButtons` options to the tree search input. - allows users to navigate their matches more easily using `next` and `previous` buttons. - allows users to `close` the search input. - fixed incorrect implementation of the `searchBox.onPrevious` callback. Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
eae67a2
to
d109e5b
Compare
It works nicely! A useful feature ;) |
showButtons
options to the tree search input.next
andprevious
buttons.close
the search input.searchBox.onPrevious
callback.Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com