inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is
https://reactdatagrid.io
Other
3.45k stars 57 forks source link

How to trigger new data fetching inside onEditComplete? #383

Open aravindttand opened 9 months ago

aravindttand commented 9 months ago

I have a function which returns Promise<{ count: number; data: [] }>, and no extra state. So everything is handled efficiently by itself. But inline editing feature is needed, so I enabled editable, and added a function inside onEditComplete. This function will update the data in the server. Once that is successfull, how I will re-fetch new data or how I will trigger the dataSource again? I didn't find any good resources or examples in the docs.

And one more thing, If I convert everything to controlled (like skip, limit etc), if somebody clicks on that refetch button on the default Pagination toolbar, what is the event which I should listen to? Anyway this is not related to the top question. Top one is the priority. Hope you will answer @inovua