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.24k stars 3.08k forks source link

v7 Feedback & Ideas #1252

Closed Grsmto closed 5 years ago

Grsmto commented 5 years ago

Hi, First, I'm trying v7, it's awesome to work with Hooks! Trying it for the first time so my comments might be wrong.

Describe the bug This are more of an architecture comment than a bug: If you disable useExpanded hook, the table breaks. I know in userland you can't disable this hook but the fact that this happens, (edit: actually you can) probably demonstrates wrong app design: I figured out this is happening because you're building initial state within the useExpanded hook (row.cells = ...).

Expected behavior I think that adding or removing hooks should not break the entire component. Hooks should be encapsulated.

Codesandbox! https://codesandbox.io/s/nk9rmym6m4

Solution That initial state logic could be within useTable itself (tested and works fine). I can provide a PR if needed.

Reksraj commented 3 years ago

Is there any link for server side (manual pagination)? I was trying to get data from server, it shows just top 10, not other data's as server side pagination set for 10row's of data foe each page. Any help on this please

{ "count": 15, "next": "http://127.0.0.1:8000/api/v1/applicant/?page=2", "previous": null, "results": [ ... ... ] }