react-admin
react-admin copied to clipboard
Add emptyText property to SelectArrayInput
It would be nice to allow to specify what should be rendered inside a SelectArrayInput when no choice is selected. This feature is already present in the SelectInput.
For example:
const channelChoices = [
{id: "email", name: "Email"},
{id: "push", name: "Push Notification"},
];
<SelectArrayInput source="channels" choices={channelChoices} emptyText={<i>All Channels</i>} />
Indeed! Can you open a PR?
Hello, I'm a software engineering student I wanted to make my first contribution to an open source repository, can I act on this issue?
Hi @Tomas025, of course! Be aware that you'll need to:
- target the
nextbranch as this is a new feature - add a story for this new prop in https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/input/SelectArrayInput.stories.tsx
- add tests in https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/input/SelectArrayInput.spec.tsx using the story above
- add documentation for this new prop in https://github.com/marmelab/react-admin/blob/master/docs/SelectArrayInput.md
Good afternoon, I uploaded a PR adding the empty Text, could you check please #10504