question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select Component with labelInValue option get wrong value

See original GitHub issue

Version

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:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
yesmeckcommented, Jan 30, 2018

labelInValue is not expected to work with combobox mode.

1reaction
Mr-Yycommented, Feb 2, 2018

I use showSearch and onSearch to achieve the feature that select one from request, it seem like combobox mode. But Component style is “Select” not “Input”. So, what the combobox mode is prefer to do?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found