fix(paginator): empty when count equals button
parent
8d77f9e9fb
commit
56ab163369
|
@ -67,7 +67,7 @@ export function usePaginator<T, P, U = T>(
|
||||||
if (!result.done && result.value.length) {
|
if (!result.done && result.value.length) {
|
||||||
const preprocessedItems = preprocess([...nextItems.value, ...result.value] as (U | T)[])
|
const preprocessedItems = preprocess([...nextItems.value, ...result.value] as (U | T)[])
|
||||||
const itemsToShowCount
|
const itemsToShowCount
|
||||||
= preprocessedItems.length < buffer
|
= preprocessedItems.length <= buffer
|
||||||
? preprocessedItems.length
|
? preprocessedItems.length
|
||||||
: preprocessedItems.length - buffer
|
: preprocessedItems.length - buffer
|
||||||
;(nextItems.value as U[]) = preprocessedItems.slice(itemsToShowCount)
|
;(nextItems.value as U[]) = preprocessedItems.slice(itemsToShowCount)
|
||||||
|
|
Loading…
Reference in New Issue