Closed jmcopeland closed 2 years ago
It's an interesting case, but unfortunately it's impossible to solve it. I'll leave the issue open, but do not expect any solution.
Just curious, what makes it impossible?
I'm trying to make this work to fix an annoying UI/UX issue with the table that has shown up in our user testing, which is that when you move between pages the scroll holds its place, and users get confused. So I'm trying to auto-scroll to the top upon page change. Maybe there is another way to deal with this?
The header does not occupy space in the scrolling parent, except when the scroll top is 0. So from the pov of the virtual scroll the first row is scrolled in the right position. I'll take a look again this week, maybe I missed something.
:) I was tired yesterday - it cannot be solved for normal QTable, but it's already solved for QTable using virtual-scroll
Awesome! Thank you so much. Any gotchas to be aware of when using the virtual-scroll?
Not that I can think of right now. But I think I'll be able to fix it for non-virtual also if you provide the height of the sticky on top
Enhancement will be available in Quasar v2.8.4 and v1.20.2
What happened?
GIVEN I have a paginated table with a sticky header and the table is scrolled down, WHEN I try to using table.scrollTo(0) to scroll to the top, THEN the first row is hidden behind the sticky header.
What did you expect to happen?
WHEN scrolling to the top of a table (index 0) then I expect that first row to be visible, not hidden behind the sticky header.
Reproduction URL
https://codepen.io/jmcopeland/pen/rNvwOGq
How to reproduce?
Steps:
Expected:
Actual:
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Components (quasar)
Platforms/Browsers
Chrome, Safari
Quasar info output
Relevant log output
No response
Additional context
No response