feat: avoid reordering pagination border effects (#877)

This commit is contained in:
patak 2023-01-08 17:04:26 +01:00 committed by GitHub
parent f8692ed480
commit efe406df5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 10 deletions

View file

@ -10,6 +10,7 @@ const {
keyProp = 'id',
virtualScroller = false,
eventType = 'update',
buffer = 10,
preprocess,
} = defineProps<{
paginator: Paginator<T[], O>
@ -17,6 +18,10 @@ const {
virtualScroller?: boolean
stream?: Promise<WsEvents>
eventType?: 'notification' | 'update'
// When preprocess is used, buffer is the number of items that will be hidden
// until the next pagination to avoid border effect between pages when reordering
// and grouping items
buffer?: number
preprocess?: (items: T[]) => any[]
}>()