-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set totalRows #117
Comments
Are you sure that you can't integrate react-query with |
So I was able to integrate reactQuery using I wonder if I could get it working somehow with |
I'm not a |
@NadavShaar Ah sorry for the delay I was really busy. Here is some repro https://codesandbox.io/s/react-grid-table-async-forked-odt8ii |
Fixed: https://codesandbox.io/s/react-grid-table-async-forked-1o3w4h?file=/src/App.js |
Oh god... I knew I was missing something! This will simplify a ton of my component. Thanks a lot <3 |
I have one more problem. How Do i handle the external state with the table. I want to handle search and Headers with custom dropdown filters. For search I managed to pull the search component out of the table components and its state is preserved but I need to manually handle all the details regarding resetting pagination etc. Which again Im doing it wrong and hacking around. Secondly for my Test select component I can't manage to get the external state to drill down to it. It does update on top level but inside the Test component it doesn;t change why that could be ? |
@NadavShaar |
The
onRowsRequest
is kinda inconvenient and not elastic enough to use when using React Query for data fetching.I would like to be able to set
totalRows
insync
mode but insteadtotalRows
are only able to be set when inasync
mode which need the use ofonRowsRequest
but I don't need to useonRowsRequest
with ReactQuery.react-grid-table/src/hooks/useRows.jsx
Line 34 in c71ff5b
Whenever I provide the property to the table it should take it no matter if its async or sync mode.
ReactQuery handles all internal data fetching logic and returns the results ->
{ isLoading, isError, data, refetch }
so I want just to supply the returned data to the
react-grid-table
via therows
andtotalRows
but I can't controltotalRows
in this case which prohibits me of using this like that.The text was updated successfully, but these errors were encountered: