You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @521guyu. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 7 days.
What problem does this feature solve?
默认option.props.children的类型是string,使用indexOf,toLowerCase字符串的方法都没问题。但是一旦Option标签里显示值的前后有空格则option.props.children的类型则会成为array类型。这时如果使用了string的方法则会报错导致页面崩溃。
例如:
const name="maz"; <Otion> {name} </Option> //<Otion>{name}</Option>这样就没问题
这时option.props.children就会变为数组类型['','maz',''];
最小可复现代码
https://codesandbox.io/s/enqcp?file=/index.js
What does the proposed API look like?
正则自动匹配当前筛选项是否包含空格自动去除。考虑到有的需求需要保留空格,可以给filterOption加一个属性是否去除空格。
The text was updated successfully, but these errors were encountered: