ElasticUI EuiComboBox使用
   
<EuiComboBox
	placeholder="Select options"
	options={this.state.selectSTypeAllItems}
	selectedOptions={this.state.selectedSTOptions}
	onChange={this.onComboBoxSTChange}
	fullWidth
/>
 onComboBoxSTChange = selectedOptions => {
        this.setState({
            selectedSTOptions:selectedOptions
        } , () => {
            this.initSearchFormCNData();
        });
    };
options:数据源,即从后台获取的所有数据,不需要做已选中(selectedSTOptions)的数据删除。
selectedOptions:已选中的数组列表
onComboBoxSTChange:该方法直接获取的即为已选中数组。
 
版权声明:本文为chendi19881217原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
