Fix race condition which prevented pagination if the initial page load in a table encountered the internal row join limit
This commit is contained in:
parent
763c04048c
commit
337b1189ec
|
@ -15,8 +15,14 @@ export const initialise = context => {
|
|||
)
|
||||
|
||||
// Fetch next page when fewer than 25 remaining rows to scroll
|
||||
remainingRows.subscribe(remaining => {
|
||||
if (remaining < 25 && get(rowCount)) {
|
||||
const needsNewPage = derived(
|
||||
[remainingRows, rowCount],
|
||||
([$remainingRows, $rowCount]) => {
|
||||
return $remainingRows < 25 && $rowCount
|
||||
}
|
||||
)
|
||||
needsNewPage.subscribe($needsNewPage => {
|
||||
if ($needsNewPage) {
|
||||
rows.actions.loadNextPage()
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue