-
-
Notifications
You must be signed in to change notification settings - Fork 478
Add backfill #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backfill #218
Conversation
e7bd182
to
3378d34
Compare
依赖 react-component/menu#93 测试才能过。 |
普通模式不会回填吗?我看只是改了 placeholder |
@jaredleechn 会的,这个 PR 依赖 react-component/menu#93 ,你可以在本地先改下 menu 的代码。 |
😳 |
|value | current selected option(s) | String/Array<String>/{key:String, label:React.Node}/Array<{key, label}> | - | | ||
|firstActiveValue | first active value when there is no value | String/Array<String> | - | | ||
|labelInValue| whether to embed label in value, see above value type | Bool | false | | ||
|backfill| whether backfill select option to search input (Only works in single and combobox mode) | Bool | false | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single 模式支持 backfill 感觉没啥意义,只是个展示效果?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只是顺便支持下
src/Select.jsx
Outdated
}, 0); | ||
} | ||
if (value.length && value[0].key === selectedValue) { | ||
if (lastValue && lastValue.key === selectedValue && lastValue.backfill !== true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastValue.backfill !== true
=> !lastValue.backfill
@yesmeck how to disable backfill feature? |
Close ant-design/ant-design#5764
single
combobox