TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
25.33k stars 3.09k forks source link

Preview not loading for Kitchen Sink example #5788

Open Guiw5 opened 1 month ago

Guiw5 commented 1 month ago

The current example doesn't load the preview since there is a minor bug in the code

File: examples/react/kitchen-sink/src/components/ActionButtons.tsx

Section:

<span className="flex items-center gap-1">
  | Go to page:
  <input
    type="number"
    min="1"
    max={table.getPageCount()}    /////////// table doesn't exist here, should refer to pageCount prop \\\\\\\\\\\\\
    defaultValue={pageIndex + 1}
    onChange={e => {
      const page = e.target.value ? Number(e.target.value) - 1 : 0
      setPageIndex(page)
    }}
    className="border p-1 rounded w-16"
  />
</span>

I would be grateful to contribute to the fix.

GH-TIMe commented 3 weeks ago

Found pull request for this issue: https://github.com/TanStack/table/pull/5786