TatuLund / grid-scroll-extension

Extension for Vaadin Grid to maintain scroll position in TabSheet and setting/getting scroll position from the server side.
Apache License 2.0
1 stars 3 forks source link

Scroll position is not always the "right one" #2

Closed jcgueriaud closed 6 years ago

jcgueriaud commented 6 years ago

Hi,

I have an error. I created a grid with a lazy provider and 2 buttons (savePosition , scrollTo and a input to show the position for testing purpose). The scroll position retrieved is not always the right one (especially when you jump from one position to another one, but you can have the same problem when you scroll).

I create a spring boot project to reproduce my problem. Steps to build: git clone https://github.com/jcgueriaud/gs-crud-with-vaadin.git cd gs-crud-with-vaadin/complete mvn install -DskipTests mcn spring-boot:run

Steps to reproduce: When the application is launched (scrollPosition = 0). Fill the input "Scroll Position Y" with 360401 and click on "Scroll to Position" --> The grid scrolls to ID 9485 (Perfect ! ) Then click on save Position --> Position is wrong (set to 0 or saomething else but not 360401)

Do you have an idea of the origin of the problem ? (here the code of main UI https://github.com/jcgueriaud/gs-crud-with-vaadin/blob/master/complete/src/main/java/hello/VaadinUI.java )

Thanks,

TatuLund commented 6 years ago

That is odd. I just added the similar features to demo, and it seems to work properly, what I am doing differently? See here

https://github.com/TatuLund/grid-scroll-extension/tree/vaadin8

TatuLund commented 6 years ago

I think, I can reproduce it, it is quite subtle.

TatuLund commented 6 years ago

I uploaded new version to Directory, try it and thank you for reporting the issue.

jcgueriaud commented 6 years ago

Thanks a lot for your bug fix. (i build it from github and try it :)) It's working perfectly.

TatuLund commented 6 years ago

I am glad to hear this, thanks. I would appreciate your rating and feedback in Directory https://vaadin.com/directory/component/gridscrollextension-add-on