marmelab/react-admin

Add emptyText property to SelectArrayInput

Open

#10.454 geöffnet am 20. Jan. 2025

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (5.138 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (23.863 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 13h) (18 gemergte PRs in 30 T)

Beschreibung

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>} />

Contributor Guide