skratchdot / react-bootstrap-multiselect

A multiselect component for react (with bootstrap). This is a react port of bootstrap-multiselect.
http://projects.skratchdot.com/react-bootstrap-multiselect/
Other
119 stars 61 forks source link

Selected items don't update after setState #7

Open tomaskikutis opened 9 years ago

tomaskikutis commented 9 years ago

In demo code there is handleChange function, which updates first select(labeled "no optgroups"), with new values after any select changes.

handleChange: function () {
        this.setState({
            list: [{value:'One'},{value:'Two'},{value:'Three'},{value:'Four',label:'Four Label'}]
        });
    },

If it worked correctly, no values should be selected in first select after first change of any select, but old values stay and state is not being re-rendered.