function Dropdown(props) {
  const {id, setProps, multi} = props;

  const setValue = useCallback(newValue => {
    setProps({value: newValue});
  }, [setProps]);

  return (
    <>
      {!multi && <DropdownOptionsSingle
        id={id}
        setValue={setValue}
        {...props}
      />}

      {multi && <DropdownOptionsMultiple
        id={id}
        setValue={setValue}
        {...props}
      />}
    </>
  );
}
/**
 * Dropdown is a component to select options.
 */
Dropdown is a component to select options.
Dropdown is a component to select options .
function Dropdown(props) {
  const {id, setProps, multi} = props;
  const setValue = useCallback(newValue => {
    setProps({value: newValue});
  }, [setProps]);
  return (
    <>
      {!multi && <DropdownOptionsSingle
        id={id}
        setValue={setValue}
        {...props}
      />}
      {multi && <DropdownOptionsMultiple
        id={id}
        setValue={setValue}
        {...props}
      />}
    </>
  );
}
function Dropdown ( props ) { const { id , setProps , multi } = props ; const setValue = useCallback ( newValue => { setProps ( { value : newValue } ) ; } , [ setProps ] ) ; return ( < > { ! multi && < DropdownOptionsSingle id = { id } setValue = { setValue } { ... props } / > } { multi && < DropdownOptionsMultiple id = { id } setValue = { setValue } { ... props } / > } < / > ) ; }
Dropdown is a component to select options.
Dropdown is a component to select options .