1.0.6 • Published 7 years ago
tag-select v1.0.6
tag-select
tag select based on antd tag, support single select and multiple select
// single select
state = {
value: 1
}
handleChange = value => {
this.setState({ value })
}
const options = [{
id: 1,
text: 'a'
}, {
id: 2,
text: 'b'
}]
<TagSelect
options={options}
value={this.state.value}
onChange={handleChange}
/>
props
name | remark | required | type | default |
---|---|---|---|---|
options | options to select,ex:'a','b' or {id:1,title: 'a'},{id:2,title:'b'} | true | array | |
multiple | whether multi select,default single select | false | boolean | false |