From 3cad6930304ce6f97e565ebdb2c2b37f5f0600df Mon Sep 17 00:00:00 2001 From: Dimitri KOPRIWA Date: Sat, 23 Mar 2019 02:33:02 +0700 Subject: [PATCH 1/4] fix(Show): Allowing actions props to be customized Previously, it was impossible to write: `} />` because we were not tolerating `props` on `DefaultActions`, making the API/props useless/broken. --- packages/ra-ui-materialui/src/detail/Show.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ra-ui-materialui/src/detail/Show.js b/packages/ra-ui-materialui/src/detail/Show.js index 6fcc1504e40..e038ba1ccb5 100644 --- a/packages/ra-ui-materialui/src/detail/Show.js +++ b/packages/ra-ui-materialui/src/detail/Show.js @@ -86,6 +86,7 @@ export const ShowView = ({ hasList, hasEdit, resource, + ...actions.props })} )} From a6ba778663f9018ebf672e9f30cb3b2fa81567ca Mon Sep 17 00:00:00 2001 From: Dimitri KOPRIWA Date: Sat, 23 Mar 2019 02:37:23 +0700 Subject: [PATCH 2/4] fix(Edit): allowing actions with custom props. So far, it was not possible to edit the DefaultActions props due to this missing spread --- packages/ra-ui-materialui/src/detail/Edit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ra-ui-materialui/src/detail/Edit.js b/packages/ra-ui-materialui/src/detail/Edit.js index 050ded7361a..a1d0f49cd8d 100644 --- a/packages/ra-ui-materialui/src/detail/Edit.js +++ b/packages/ra-ui-materialui/src/detail/Edit.js @@ -92,6 +92,7 @@ export const EditView = ({ hasShow, hasList, resource, + ...actions.props })} )} From fc1afe8d367082b95b9cacc375b820f07cb304e9 Mon Sep 17 00:00:00 2001 From: Dimitri KOPRIWA Date: Sat, 23 Mar 2019 02:41:30 +0700 Subject: [PATCH 3/4] fix(Create): allow overriding of props basePath --- packages/ra-ui-materialui/src/detail/Create.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ra-ui-materialui/src/detail/Create.js b/packages/ra-ui-materialui/src/detail/Create.js index bcef0157d79..b9a9cd26c09 100644 --- a/packages/ra-ui-materialui/src/detail/Create.js +++ b/packages/ra-ui-materialui/src/detail/Create.js @@ -72,6 +72,7 @@ export const CreateView = ({ basePath, resource, hasList, + ...actions.props, })} )} From 298f24c3c082eba3529462ecdb8da6918742d43b Mon Sep 17 00:00:00 2001 From: Dimitri KOPRIWA Date: Sat, 23 Mar 2019 02:54:28 +0700 Subject: [PATCH 4/4] fix(ListToolbar): allowing custom props on actions --- packages/ra-ui-materialui/src/list/ListToolbar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ra-ui-materialui/src/list/ListToolbar.js b/packages/ra-ui-materialui/src/list/ListToolbar.js index 989377175ec..155c2d59e09 100644 --- a/packages/ra-ui-materialui/src/list/ListToolbar.js +++ b/packages/ra-ui-materialui/src/list/ListToolbar.js @@ -31,6 +31,7 @@ const ListToolbar = ({ bulkActions, exporter, filters, + ...actions.props })} );