Closed RustamKarimov3 closed 3 years ago
"react-select": "4.3.1",
I try to implement multiselect component with react-select and when I attempt to prevent closing menu on option select with closeMenuOnSelect={false} one closes anyway when value is changed with onChange callback.
const [value, setValue] = useState(); <ReactSelect<SelectOption<T>> innerRef={ref} closeMenuOnSelect={false} id={id} tabIndex={`${tabIndex}`} onChange={setValue} value={value} defaultValue={defaultValueFromOuterState} options={options} />
upd
Menu closes on any rerender even if I don't pass onChange or value prop to ReactSelect component
I am stupid, this was storybook problem
"react-select": "4.3.1",
I try to implement multiselect component with react-select and when I attempt to prevent closing menu on option select with closeMenuOnSelect={false} one closes anyway when value is changed with onChange callback.