0

I'm looking for a way to put checkboxes in an antd Select, instead of the icon displayed when an item is selected.

enter image description here

I have tried to use the menuItemSelectedIcon prop, but it only displays the Checkbox when the item is selected, which is not what I'm looking for.

I'm trying to display a checkbox that is checked when the item is selected, and isn't when the item isn't.

I'm kind of looking for an equivalent of the "treeCheckable" prop available for the TreeSelect.

Is there a way to put checkboxes inside a (simple) Select ?

Pandorque
  • 339
  • 1
  • 3
  • 13

1 Answers1

0

use menuItemSelectedIcon this prop... u can read abut it in Api section of Select component. Then, do same style in options focus, active & select selector. style should be such as the icon that you will use became different color when it is focused, active or select. you can change options global classname when it will be selected. By doing this, it will look like the checkbox is working but behind the scene it's just a icon of checkbox which will change style .

Sharif Himu
  • 116
  • 2
  • 7