This is an automated email from the ASF dual-hosted git repository.
HTHou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tsfile-viewer.git
The following commit(s) were added to refs/heads/main by this push:
new 5474759 fix: data preview table body overlapping pagination on load
(#29)
5474759 is described below
commit 5474759279782adeb3b494e1b2fa8ff073660606
Author: CritasWang <[email protected]>
AuthorDate: Thu Jul 2 18:49:09 2026 +0800
fix: data preview table body overlapping pagination on load (#29)
The data preview table hardcoded the virtual-scroll viewport height
(scroll.y = 480). After #27 added the timestamp-precision info banner
above the table, the fixed height no longer matched the actual space
left in the flex layout, so the table body overflowed onto the bottom
pagination bar.
Replace the hardcoded height with a measured one: wrap the table in a
flex-1 container and use a ResizeObserver to compute scroll.y from the
container's real client height, subtracting the measured header height
plus a scrollbar/border reserve. Re-measure after loading/data changes
(nextTick) since the column toolbar, info banner and pagination toggle
visibility. This adapts automatically to any future elements added
above or below the table instead of relying on a magic constant.
Also make .ant-card-body a flex column so the wrapper's flex-1 receives
the real remaining height, and drop an unused Spin import.