marmelab/react-admin

Add emptyText property to SelectArrayInput

Open

#10,454 创建于 2025年1月20日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)TypeScript (23,863 star) (5,138 fork)batch import
enhancementgood first issue

描述

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

贡献者指南

Add emptyText property to SelectArrayInput · marmelab/react-admin#10454 | Good First Issue