是否有可能在 React Select 到 select 中但保持输入空白?

Is it possible in React Select to select something but keep the input blank?

所以我使用 React Select 来 select 一个位置列表,但我想根据我的设计将它们呈现在 select 框下方

所以我 select 使用 React Select 然后添加到我的状态并映射过来。一切顺利

问题是,我不想将 selected 的东西添加到 select 框中,我只想将其留空,表示另一个值可以是 select编辑。我知道它并不是真正为此设计的,但想知道是否有解决办法?

您可以将 value={null} 传递给 <Select value={null},如果将来有人需要它,它不会设置值:)