7487 commented on PR #39661:
URL: https://github.com/apache/superset/pull/39661#issuecomment-5589339807
Merged current master. The conflict was add/add on
`plugin-chart-table/test/DataTable/DataTable.test.tsx` — #43150 landed a file
at the same path. Resolved by keeping that file as-is (both hook-order tests
untouched) and appending the two clamp tests on top of its existing
`columns`/`data` fixtures, so the net diff here is now just the 9-line clamp
plus 46 test lines.
Re-checked the clamp against the refactored `DataTable`: #43150 hoisted
`stableRowKey`/`signatureOfRows` to module scope and moved the
`onFilteredRowsChange` RAF effect above the `columns.length === 0` early
return. Neither touches `pageCount`/`pageIndex`/`gotoPage`, and the clamp still
sits directly after `useTable()` — before that early return — so nothing about
the ordering changed.
Local run of the merged file, 4/4 passing:
```
PASS plugins/plugin-chart-table/test/DataTable/DataTable.test.tsx
✓ keeps the hook order stable when the columns disappear
✓ keeps the hook order stable when the columns appear
pagination clamp (#31403)
✓ clamps pageIndex to the last page when it exceeds pageCount
✓ resets pageIndex to 0 when data becomes empty (pageCount === 0)
```
Reverting just the clamp fails exactly the two new tests and leaves the
#43150 ones green. `oxlint` and `oxfmt --check` are clean on both files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]