0

I am using this to build a admin UX https://github.com/marmelab/admin-on-rest and it seems to fit perfectly into what I want to build except one feature:

My work project needs to display a tree grid to display groups or subgroups of items in a tree form and also to show a drop-down to display and select a grouping field.

I think this is what is needed to achieve this: a) Write a custom "Datagrid" which I am able to write b) Custom "List" component to show grouping combo c) Add custom List actions to add '_grouping' parameter to the REST request

I am unable to pass my list component to 'Resource' since it breaks the whole app rending / events logic. In OO programming lingo this will be called a classic sub classing but React framework does not support it.

What would be a proper way to achieve this functionality ?

PS: I am new to react, redux, saga so please excuse me if this is already supported in admin-on-rest. I would appreciate if such feature is possible or can be added without forking the whole repo ( modifying the existing )

1 Answers1

0

I don't think you need to implement a custom <List> component for that need. A replacement for <Datagrid> should to the trick. You just need to add a custom action button, and you've already localized the place to add it to (<List actions>).

Try like this first, and then if it doesn't work (but you'll have to illustrate why), I can maybe look into replacing the <List> component.

François Zaninotto
  • 7,068
  • 2
  • 35
  • 56