Warning: `label` of `value` is not same as `label` in Select options.
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
选中其他option,就触发错误:Warning: label
of value
is not same as label
in Select options.
What is expected?
期望不触发这个错误
What is actually happening?
触发错误:Warning: label
of value
is not same as label
in Select options.
Environment | Info |
---|---|
antd | 4.18.7 |
React | ^16.14.0 |
System | window10 |
Browser | Microsoft Edge 98.0.1108.50 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Select Component with labelInValue option get wrong value
I use Select Component in Form.Item with getFieldDecorator, then select an option and see the log in console.
Read more >While using select in 'antd' library (Ant Design ... - Stack Overflow
I am using select in the 'antd' (Ant Design) library. The selected option is showing the value of the option instead of the...
Read more >Select - Ant Design
The labelInValue prop can be used to get the label property of the selected item. The label of the selected item will be...
Read more >Select | Quasar Framework
The QSelect Vue component has two types of selection - single or multiple. This component opens up a menu for the selection list...
Read more >HTML option label Attribute - W3Schools
Definition and Usage. The label attribute specifies a shorter version of an option. The shorter version will be displayed in the drop-down list....
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
I ran into the same problem. I fixed it by specifying
optionLabelProp="children"
in the Select component.@ta9yu thanks, It works for me.