alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

close select on selected option click #97

Closed VikLiegostaiev closed 7 years ago

VikLiegostaiev commented 7 years ago

Hi again, can u please add a method that will close select when i click on already selected option :-)

VikLiegostaiev commented 7 years ago

Something like this:

if(alreadySelected) {
        if(!this.props.deselectOnSelectedOptionClick && this.props.closeOnSelectedOptionClick) {

                    this._closeOnKeypress();
         }      
}
alsoscotland commented 7 years ago

@VikLiegostaiev Just an update: looking into this. Trying to make it behave like a native select control. There is a little complication with multiselect/tag inputs. Trying to work some bugs out for the moment

alsoscotland commented 7 years ago

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