Reactjs onSelectAll选项在react bootstrap multiselect中不起作用

Reactjs onSelectAll选项在react bootstrap multiselect中不起作用,reactjs,bootstrap-multiselect,Reactjs,Bootstrap Multiselect,我想将全选属性添加到multiselect,我添加了onSelectAllprop,但我看不到全选选项 请参阅下面的代码 <Multiselect data={this.props.list} multiple ref="industry" onSelectAll onChange={this.handleDropdown.bind(this, 'industry')} buttonText={function(opt

我想将全选属性添加到
multiselect
,我添加了
onSelectAll
prop,但我看不到全选选项

请参阅下面的代码

<Multiselect 
     data={this.props.list} 
     multiple 
     ref="industry" 
     onSelectAll 
     onChange={this.handleDropdown.bind(this, 'industry')} 
     buttonText={function(options, select) { 
                     return 'Industry ('+ options.length+')'; }} 
/>


我遗漏了什么吗?

您需要添加
includecelloption
。这在原始插件中有描述

您的
onSelectAll
应该是一个函数。当用户从下拉列表中选择
Select all
时,将调用此函数

<Multiselect 
 data={this.props.list} 
 includeSelectAllOption
 multiple 
 ref="industry" 
 onSelectAll={this.selectAll} 
 onChange={this.handleDropdown.bind(this, 'industry')} 
 buttonText={function(options, select) { 
                 return 'Industry ('+ options.length+')'; }}