tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.vercel.app
MIT License
679 stars 147 forks source link

Keep getting error on select #52

Closed ulugbekrozimboyev closed 4 years ago

ulugbekrozimboyev commented 5 years ago

The issue start to occured from 10.1 version. message is: Uncaught TypeError: this.state.value.slice is not a function My code is below:

changeUser = option => {
    this.setState({
      userId: option.value
    });
  };

<SelectSearch
                          name="userId"
                          className="select-search-box"
                          value={defaultFormData.userId}
                          height={172}
                          onChange={value => this.changeUser(value)}
                          options={ userOptions }
                          placeholder={translate('main.projectList.user')}
                        />

I roll bact to 9.6 version it is fixed.

tbleckert commented 4 years ago

Fixed in v1