Problem with Tree and Hide Row [message #1800518] |
Mon, 31 December 2018 18:14  |
Eclipse User |
|
|
|
I have written a tree using NatTable, that almost mimicks the TreeGridExample.
It shows as expected.
However, the HideRow command breaks the tree which doesn't render properly.
I have searched the forum for a similar problem, but failed to identify one.
I have uploaded my code for investigation by whomever wants.
Just hide the 'suisse' row and see that 'germany' loses its children and that the tree generally becomes mangled.
I have played around with the comparator method (which would seem the likely culprit) to no avail.
Yves
|
|
|
|
|
|
Re: Problem with Tree and Hide Row [message #1800684 is a reply to message #1800670] |
Sat, 05 January 2019 04:27   |
Eclipse User |
|
|
|
See Row 17 & 18 in the "after" image, and compare with the same items in the "before" image: they are shown with children they don't have. Conversely, Row 14 in the "before" image has lost its own children.
Furthermore, and logically, when you click on the +/- signs in the "after" tree, nothing happens.
The 4 inital files are all that you need to have the example actually run.
Your example looks like it works, but I believe it doesn't : it is too simple as far as trees are involved (depth too low) for the problems to materialize ; in addition, you use a non standard compare function for the tree, which I believe few users would use; I tried it on my own exemple, and it renders the tree in a quite different, not very natural, way.
[Updated on: Sat, 05 January 2019 04:41] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06558 seconds