-
Notifications
You must be signed in to change notification settings - Fork 8
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
ScrollToItem corrupts tree data #53
Comments
@andersforsell The scrollToItem implementation in SelectionTreeGrid is based on the workaround of missing feature in TreeGrid. This missing feature actually has now been implemented in Vaadin 24. There is now scrollToIndex(int... indeces) method. Most likely fix to your observed problem is to refactor SelcetionTreeGrid implementation to use that as scrollToIndex(int... indeces) will also activate loading of the rows data as per needed. |
@TatuLund I'm not sure it is due to the scrollToItem method because I see problems with this code as well:
Note that I'm only using the TreeGrid interface but somehow the SelectionTreeGrid implementation affects how items are fetched and displayed. Switching to the TreeGrid implementation does not show the problem. |
Note, 3.0.3 is not the latest, 3.0.4 is, and there I fixed something like you described. Can you update and check if the problem disappears. |
I tested with 3.0.4 but its unfortunately the same problem. |
@TatuLund the problem is fixed when I changed the _getItemOverriden function in helpers.js to better correspond to the overridden _getItem :
|
I can't reproduce the issues demonstrated by your code samples with version 3.0.4. Can you check browser console log if you see the warnings reported by this ticket #52 If yes, you are still having the old JavaScript, then you need to do full frontend clean by running mvn clean-frontend first and delete fronted/generated folder. |
Also your proposed fix looks to be essentially the same as already in version 3.0.4. |
Yes, you are right, it must have been the old JavaScript when I was testing. Can you please release and publish the 3.0.4 version on Maven Central? |
Version 3.0.4 has been published in Vaadin's add-on repository already. |
Duplicate of #52 |
With Vaadin 24.3.3 and selection-grid-flow version 3.0.3 I sometimes see problems that the tree data is corrupted, for example child nodes are empty.
The below code reproduces the problem if you click the button and then expand the tree data, see also snapshot.
The text was updated successfully, but these errors were encountered: