这可能是因为没有使用filterOption属性来指定选项搜索的方法。您需要在Select组件中设置filterOption方法以实现选项的搜索。例如:
import { Select } from 'antd';
const { Option } = Select;
function handleFilterOption(input, option) { return option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0; }
function Example() { return ( ); }
这里我们使用了一个名为handleFilterOption的方法来指定选项搜索的方式。该方法将输入值转换为小写并返回输入值是否包含在选项的子节点中。您可以根据需要更改此方法来满足您的需求。