ant-design: Select `onChange` causes warning: `label` of `value` is not same as `label` in Select options.

What problem does this feature solve?

we can add the prefix icon in select option in some case needed

What does the proposed API look like?

<Select options={[
   {
       prefixIcon: <AppleIcon />,
       label: 'Apple',
       value: 'apple'
   }
]} />

or

<Select>
   <Option prefixIcon={<AppleIcon />} value="apple">
        Apple
   </Option>
</Select>

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Using optionLabelProp="label" could avoid this warning.