-
Notifications
You must be signed in to change notification settings - Fork 883
Description
Environment
- Operating System: Linux
- Node Version: v22.12.0
- Nuxt Version: 3.17.7
- CLI Version: 3.26.4
- Nitro Version: 2.12.3
- Package Manager: [email protected]
- Builder: -
- User Config: compatibilityDate, components, devtools, imports, apollo, modules, css, runtimeConfig
- Runtime Modules: @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @rudedog9d/[email protected], @pinia/[email protected], [email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v3.x
Version
v3.3.2
Reproduction
https://codesandbox.io/p/sandbox/cool-tree-539lz5
This example should be broke on page load. If you remove :globalFilter="filter"
, then refresh the preview, you can see the pagination initialize correctly.
I have included a watch
console.log
for the total
, which represents the value of tableApi?.getFilteredRowModel().rows.length
Description
There is a bug with either NuxtUI Table, or Tanstack Table, when utilizing globalFilter
and Pagination together. It seems that tableApi?.getFilteredRowModel().rows
is not being initialized correctly.
When globalFilter
is provided, the initial page load will not properly initialize the pagination total length using getFilteredRowModel
, but when the globalFilter
prop is removed from <UTable />
, pagination initializes fine.
The pagination component also correctly updates if the filter is modified - it is ONLY a bug during the initial page load.
Additional context
No response