0

Is there a way to make a custom button that will take you to a page, and then have it so you can show data in a DataGrid?

For example, say we have a DataGrid and you click on the show button for a post with the id = John. The show button would take you to /resource/id/show and in there you can have a DataGrid with all the attributes of John.

So I want to make a button to take me to /resource/id/name instead of show where I can have a Datagrid with properties of name from the specific id.

Is something like this possible?

Stebermon
  • 71
  • 1
  • 8

1 Answers1

1

Yes you can :) You should:

  • declare a custom route for your custom page

  • create a button component that you pass to the List component actions

Gildas Garcia
  • 6,966
  • 3
  • 15
  • 29
  • Do you have an example of a custom route that is not that tutorial? I am looking for something that is actually being used; the tutorial seems very basic and doesn't get into complex routes. @Gildas – Stebermon Jul 17 '17 at 19:02
  • @FrançoisZaninotto same question to you as Gilas. – Stebermon Jul 17 '17 at 19:04
  • No, you'll have to do it yourself. It's just React and React Router, so there is nothing specific to admin-on-rest in that case. – François Zaninotto Jul 19 '17 at 12:56