[FEAT] Please make the PageHeader extra extensible
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently the views such as Show
, Edit
, Create
, List
etc. offer default buttons in the PageHeader extra
. This is good because these default buttons inherit many things such as recordItemId
, dataProviderName
etc from the parent view component and auto-configure themselves.
The problem is, when we need to add additional buttons before and after the default buttons. For example, in the Show
view I already get a RefreshButton
by default and would like to add a Download
button before the built-in Refresh Button.
This requires me to rewrite everything in the PageHeader extra
(including all the configuration of recordItemId
, dataProviderName
etc required for the built-in buttons).
There is no way to just prepend and append few buttons to the already existing built-in buttons.
Describe the solution you’d like
- Kindly allow extra ReactNode contents to be prepended and appended to the built-in Page Header components (instead of overwriting them)
For example,
- Should be able to add few
ReactNode
s before the built-inextra
components and after the built-inextra
components in thePageHeader
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hey @KrishnaPG, thank you for the issue! I think this will be a nice feature 🚀 We’re currently working on a refactor in UI framework integrations and added couple of props to do changes in action buttons at the header and the footer of the crud elements like
headerButtons
andfooterButtons
, which areactionButtons
currently. We’ll also updateheaderButtons
and footerButtons` like the following;Type
Usage
This will allow developers to prepend/append elements to the current buttons. Hope you like this approach, we’re aiming to release this as soon as possible.
Hey @KrishnaPG, we’re releasing the changes to
next
channel today including the feature mentioned here https://github.com/pankod/refine/issues/2246#issuecomment-1198974638Currently, we don’t offer modifications on the default buttons but there’s an on-going internal discussion on how to achieve this, there are multiple ideas on implementation of those. We’ll announce the decision and place it on the roadmap as soon as possible. Thank you for your patience.