tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.com
MIT License
676 stars 149 forks source link

The page keeps refreshing when I select an option on a multiple select #149

Open cc3613 opened 3 years ago

cc3613 commented 3 years ago

I cannot select multiple values without holding Cmd key

My usage of SelectSearch in the component <SelectSearch search multiple emptyMessage="Cannot find class" options={this.state.lessonSelections} placeholder="Class" closeOnSelect={false} printOptions="on-focus" className='select-search' onChange={this.handleLessonsChange.bind(this)} />

My handleLessonsChange


    this.setState({
      lessons: state
    });
  }```

and then the state

```this.state = {
      studentSelections: [],
      lessonSelections: [],
      materialSelections: [],
      student: '',
      lessons: [],
      materials: [],
      data: {},
    };```

I'm just lost on how I can select multiple values like how it is in the storybook