Select Component with labelInValue option get wrong value
See original GitHub issueVersion
3.1.6
Environment
macOS 10.13.2, Chrome 63
Reproduction link
https://codesandbox.io/s/rlww31nxpm
Steps to reproduce
I use Select Component in Form.Item with getFieldDecorator, then select an option and see the log in console. Please see detail in Reproduction link
What is expected?
{
key: '1',
label: 'Jack'
}
What is actually happening?
{
key: '1',
label: '1'
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Modify values of selected option ANTD - reactjs - Stack Overflow
1 Answer 1 ; Select labelInValue ; style · {{ ; width: · 120px ; fontSize: · 11.25px ; bordered · {false} ...
Read more >Select - Ant Design
Select component to select value from options. ... The labelInValue prop can be used to get the label property of the selected item....
Read more >Select - Ant Design
Select. Select component to select value from options. ... Get value of selected item ... The labelInValue prop can be used to get...
Read more >Select - Ant Design - A UI Design Language
Property Description Type Default
allowClear Show clear button. boolean false
autoFocus Get focus by default boolean false
defaultActiveFirstOption Whether active first option by default boolean true...
Read more >rc-tree-select - npm
tree-select ui component for react. ... React TreeSelect Component ... whether to embed label in value, see above value type, Bool, false.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
labelInValue
is not expected to work withcombobox
mode.I use
showSearch
andonSearch
to achieve the feature that select one from request, it seem likecombobox
mode. But Component style is “Select” not “Input”. So, what thecombobox
mode is prefer to do?