Vaadin - Table Scroll
Condition:By Clicking "Find Next" button, the record in the table containing the input name will be highlighted.
It should be called table.setValue(itemId) to set which record should be highlighted and setCurrentPageFirstItemId(itemId) to scroll to the highlighted record as the first row in the table.
However, I found that function setCurrentPageFirstItemId could work properly. It cannot locate the right position for the highlighted record. I tried to find the reasons/causes related to that on the internet. Someone has the same issue but no solution provided.
Problem:
The problem is the modified CSS. I set all the cell content be "pre-wrap" like
.v-table-cell-wrapper{ font-size: 9px; white-space: pre-wrap !important; }
Solution:
The white-space: pre-wrap !important should be removed because Vaadin could not encounter the dynamic row height I guess.