Hi, I recently discovered this bug, and it is pretty annoying.
Current behaviour:
After selecting the root node (with atleast one child) in the tree, the scrollbar moves automatically to top.
It only happens, when the root node has atleast 1 child and only when you are selecting it.
_How to reproduce -_ Scroll for example to the end of the 1st tree and select any root node with atleast 1 child.
Expected behaviour:
After selecting the root node (with atleast one child) in the tree, the scrollbar should stay at the same position.
If you for example scroll into the end of the 2nd tree and then select any root node, it stays at the same position, like it should.
Hi, I had the same issue and I solved it by adding scrollContainer to my options:
options: ITreeOptions = {
scrollContainer: <HTMLElement>document.body
};
@srdex thanks, that helped :), but it should be already fixed by default and not by doing this.
What is the status? Is it gonna be fixed anytime soon?
Try to add 'scrollOnActivate: false' in the options.
Could the scrollContainer value be an expression? Because the scrollable container is initialized at the same time with the tree and there is no way (I wasn't able to find) to change it after init.
Most helpful comment
Hi, I had the same issue and I solved it by adding scrollContainer to my options: