alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Clear Search Input and reset filter after selecting an Item from searchable dropdown #62

Closed amgohan closed 8 years ago

amgohan commented 8 years ago

Can you add an option to be able to clear the search input and reset the filter after selecting an Item.

Use case :

we want to clear the input and reset the filter after the first select.

alsoscotland commented 8 years ago

@amgohan I think this likely makes sense as an option. Can you tell me more about the configuration you are using? Is it a multiselect or tag input?

amgohan commented 8 years ago

this is what we use now

<Select placeholder="Select something"
                              dataSource={data}
                              onChange={this.change}
                              searchable={true}
                              clearable={false} />

the behaviour we want : every time we expand the drop down we want to start from scratch for filtering (no filter applied and focus on the input)

alsoscotland commented 8 years ago

@amgohan Sure. I can make that an option. I will try to get it done in the next day or two

amgohan commented 8 years ago

Thanks, by the way you did an awesome work in this component

alsoscotland commented 8 years ago

@amgohan Thank you! Very glad to have people finding it useful

alsoscotland commented 8 years ago

@amgohan Still working on this. Just wanted to let you know

amgohan commented 8 years ago

@alsoscotland thanks for the update

alsoscotland commented 8 years ago

https://github.com/alsoscotland/react-super-select/pull/68

alsoscotland commented 8 years ago

https://github.com/alsoscotland/react-super-select/tree/v0.5.0