在 react-select 中自定义“未找到数据”验证消息

Customizing the `No data found` validation message in react-select

当键入时未找到数据时 react-select 显示的默认消息是 No option。是否可以自定义此消息?

您可以这样使用 noOptionsMessage prop

<Select options={options} noOptionsMessage={() => 'FOOOO!'}/>

可以看到working here