frontend-collective / frontend-collective/react-sortable-tree

Minor issues with search

Open
#148 1 comment 0 reactions 0 assignees View on GitHub
bug investigate
Dominant language
JavaScript
Stars
5k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

Hello,

First issue with issue happens on the demo page as well (https://fritz-c.github.io/react-sortable-tree/)
It's a bit difficult to explain, but if you search something that has more than 1 result, then move to the second or any other result that's not the first one, and then search again with only ONE key press with something that will yield only 1 result, the node is correctly found but the tree is not scrolled.

Example on the demo page:
- Search for "Dep", and hit enter until you are on the "Depth: 5" node, the first search result "Limit nesting with ..." should be barely visible now.
- Move to the beginning of the text input and type "x", you should have "xDep" now, you can see only 1 result is found now, and the node correctly highlighted but the tree isn't scrolled until you actually type something else.

Something very similar happens when you collapse all nodes, trying to search or move the search node to the next value won't automatically scroll the first time, you need to "move" twice in order for it to work. For example, search for "Dep", move until the 4th result and then collapse all, finally hit enter on the search text and the tree will expand again but it won't scroll to the matched node until you actually hit enter twice, this is an issue if you only have 1 result, since you have to delete and write again.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.