iulianraduat / react-select-material-ui

A react SELECT component based on react-select and looking like a material-ui component
MIT License
73 stars 18 forks source link

How to clear SingleSelect values with backspace or X sign? #17

Closed xploreraj closed 5 years ago

xploreraj commented 5 years ago

I tried below but there is no impact.

<ReactSelectMaterialUi 
    style={{ width: 400 }}
    options={props.managerIds}
    placeholder='Enter or select a manager corp id'
    SelectProps={{
        backspaceRemovesValue: true
    }}
/>
<SingleSelect
    style={{ width: 400 }}
    options={props.locations}
    placeholder='Enter or select a location'
    SelectProps={{
        backspaceRemovesValue: true,
    }}
/>
iulianraduat commented 5 years ago

Hi,

Please try the following code (took from example 'Clearable - Single select' in storybook) and let me know if it works (it works in storybook):

<ReactSelectMaterialUi
        label="Clearable - Single select"
        SelectProps={{ isClearable: true }}
        ...
/>
xploreraj commented 5 years ago

Thanks iulian. It worked.