Cmd如果不按住键,我无法选择多个值
我在组件中使用 SelectSearch
<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)} />
我的handleLessonsChange
handleLessonsChange(value, state, props) {
this.setState({
lessons: state
});
}
然后是状态
this.state = {
studentSelections: [],
lessonSelections: [],
materialSelections: [],
student: '',
lessons: [],
materials: [],
data: {},
};
我只是迷失了如何选择多个值,例如故事书中的值