fix: DataTable tooltip placement on paginated pages#3631
fix: DataTable tooltip placement on paginated pages#3631LarytheLord wants to merge 4 commits intoplotly:devfrom
Conversation
Port the pagination tooltip row-index fix from plotly/dash-table#906 and add a regression unit test for paginated row handling in cell event tooltip state. Signed-off-by: LarytheLord <llawlietbagsum@gmail.com>
|
CI note from my side: The failing CircleCI job ( Failure details:
I can rework/follow up immediately if a maintainer wants any additional validation, but this looks like an external/flaky failure path outside the touched files. |
|
Follow-up pushed in commit Root cause was a debounced callback in Changes in this commit:
This targets the JS console error that was tripping |
|
CI follow-up: I inspected the latest failing CircleCI run (
If maintainers prefer, I can rebase/retrigger, but based on the log this looks unrelated to the fix in this branch. |
|
Pushed another follow-up ( What I changed:
This avoids the behavioral side-effects from the earlier broader refactor while still preventing the null-ref crash. |
|
Follow-up pushed in |
Summary
This fixes DataTable tooltip placement on paginated pages by correcting how tooltip row indices are tracked in cell mouse handlers.
What changed
cellEvents:handleEnter()now storescurrentTooltip.rowdirectly from the provided row index.handleMove()now compares/updates against the provided row index directly.ifRowIndex(...)now evaluates against the virtualized source index for the visible row.components/dash-table/tests/js-unit/cellEvents_tooltip_pagination_test.tsContext
This ports and completes the approach from the old
plotly/dash-tablePR:Related issue:
Validation
From
components/dash-table:npm cinpm run private::test.unit -- --grep "cell events - tooltip row index with pagination"npm run private::lint.ts -- src/dash-table/handlers/cellEvents.ts src/dash-table/derived/table/tooltip.ts tests/js-unit/cellEvents_tooltip_pagination_test.ts