react-component / select

React Select
https://select.react-component.now.sh/
MIT License
892 stars 451 forks source link

Select filterSort 函数需要能够获取 inputValue 来计算排序 #1050

Closed hungtcs closed 3 weeks ago

hungtcs commented 3 weeks ago

What problem does this feature solve?

filterSort 可以对搜索结果进行排序,但是有时候排序需要根据 搜索字符串(inputValue)来决定。

What does the proposed API look like?

在 filterSort 函数中添加第3个参数,值是搜索字符串。

(optionA: Option, optionB: Option, info: { inputValue: string }) => number

Ref: https://github.com/ant-design/ant-design/issues/49248