verbal-limeV
Refine3y ago
6 replies
verbal-lime

Custom data-provider for same resource and "useTable" for different http requests

I need to build a custom data provider for fetching data from my API. My use case requires me to show a table with each table row having a show button. If a show button is pressed, forwards to a different view and renders a new table (loading data by calling a different endpoint).

My first table works and I am now trying to trigger the other endpoint and render the second table.

As I understand, I need to use the "useTable" hook, which triggers the "getList" method from the dataProvider.

Since I can only have 1 getList method in the dataProvider, how can i make this "useTable" hit the http request i need, so i can pass the data with {...tableProps} ?

Is it possible to make the "useTable" hook trigger a specific method?


I've been through documentation and checking examples but no luck.

Any help, please
Was this page helpful?