react-admin extensions
Let's start of by saying that react-admin rocks! That means the people building and supporting it are really all-in with this framework. I'm using it for all my clients. Sometimes it happens that a feature or component is requested, but it isn't getting added to react-admin. In those cases it's often said that they won't add and it can be solved in userland. I respect that.
Welcome to userland, but organised! 👨💻👩💻
This repo is here to provide an additional set of components, hooks, action, etc that are not added (yet) to react-admin itself.
Available extensions
- button
- BulkExportButton
Can't find what you're looking for? Either propose your component or addition in a PR. Or create an issue to request or discuss it.
Also, many packages have been already been published by the community that augment react-admin. Most of them provide one functionality or component. The intention of this repo is to house many (unrelated) components that we as a community can contribute to and use.
Installation
yarn add ra-extensions
Usage
BulkExportButton
;;;;; const exporter = { const csv = ; ; // download as 'somelist.csv` file}; const BulkActionButtons = <Fragment> <BulkExportButton resource=resource selectedIds=selectedIds exporter=exporter /> </Fragment>;BulkActionButtonspropTypes = resource: PropTypesstring selectedIds: PropTypesarray; const SomeList = <List ...props bulkActionButtons=<BulkActionButtons /> exporter=exporter > <Datagrid rowClick="edit"> <TextField source="id" /> <TextField source="b" /> <TextField source="c" /> </Datagrid> </List>; ;
Translation
Add the extra translations that some components may require.
// standard react-admin translations;; // ra-extensions translations; // your own translations; const messages = fr: ...frenchMessages ...raxMessagesfr ...domainMessagesfr en: ...englishMessages ...raxMessagesen ...domainMessagesen ;const i18nProvider = messageslocale; const App = <Admin i18nProvider=i18nProvider> ... </Admin>;