Does the Select control in ant design support one-click all / empty selection in multi-select mode?

if I don"t support it, how can I add a checkbox to the control to realize the one-click all / empty selection function? does the god know

clipboard.png

May.21,2022

in my previous answer, I talked about how to use additional buttons to control the change of selected values in the component, but the extra buttons may not look good if they are placed near the option box. I'll provide a solution for putting the select all button on the drop-down list.

refer to the official documentation use dropdownRender to freely extend the drop-down menu.
< table > < thead > < tr > < th align= "left" > parameters < / th > < th align= "left" > description < / th > < th align= "left" > Type < / th > < th align= "left" > default < / th > < th align= "left" > version < / th > < / tr > < / thead > < tbody > < tr > < td align= "left" > dropdownRender < / td > < td align= "left" > Custom drop-down box content < / td > < td align= left "> (menuNode: ReactNode, props) = > ReactNode < / td > < td align= "left" >-< / td > < td align= "left" > 3.11.0 < / td > < / tr > < / tbody > < / table >
  

currently Select components do not provide configuration for this property
you can bind Select to a controlled component (value is bound to state)
and then add a select / empty button on the right
to change the value of state when you click.

Menu