React-admin: Add ability to hide export button in the list, potentially by passing exporter={null}.

Created on 11 Oct 2018  路  2Comments  路  Source: marmelab/react-admin

Is your feature request related to a problem? Please describe.
While upgrading to react-admin from admin-on-rest, one major visible change is the ExportButton added to the top of all Lists. However, without fully customizing the exporter function per each resource, it is not ideal to have this displayed to the user.

Describe the solution you'd like
A desired solution is that I can hide the Export Button on individual lists until the exporter function is set for it.

Describe alternatives you've considered
I attempted to set exporter={null} but this did not remove the Export Button. Perhaps this can be the check in the default actions component, to not display the ExportButton if the exporter function is specifically passed as null or undefined. I understand that a workaround to hide this button can be to recreate and pass a custom actions to the list, however a List prop, even the same prop that defines the function, would be more developer friendly.

Most helpful comment

This feature was added since.
Simply pass exporter={false}.
Hope it helps the next guy looking for this.

All 2 comments

Hiding the export button is already possible. React-admin is configurable, but not the way you describe.

You must create a custom actions toolbar, as described in the documentation (https://marmelab.com/react-admin/List.html#actions). Just don't put the export button in that toolbar.

This feature was added since.
Simply pass exporter={false}.
Hope it helps the next guy looking for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicgirault picture nicgirault  路  3Comments

alukito picture alukito  路  3Comments

Kmaschta picture Kmaschta  路  3Comments

phacks picture phacks  路  3Comments

fzaninotto picture fzaninotto  路  3Comments