africandrogba
africandrogba

Reputation: 432

When I click on a row, it should go to another list page

I have a bunch of campaigns like this

enter image description here

Whenever I click on a row, I want to see the list of activities for that campaign, like this in react-admin

enter image description here

I tried to use rowClick option but it didnt appear like it can do that. Any thoughts ?

Upvotes: 1

Views: 182

Answers (1)

Gildas Garcia
Gildas Garcia

Reputation: 7066

You can pass a function to the rowClick function which has this signature: (id, basePath, record) => string.

Make it return the path to your list: /my-resource.

You may even include filters, sort and pagination parameters: /my-resource?filter={}&sort=date&order=DESC&page=1&perPage=10.

Upvotes: 3

Related Questions