mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
fix: input-tag max 属性bug修复
This commit is contained in:
parent
f97d246210
commit
7a47167388
@ -253,6 +253,7 @@ export default class TagControl extends React.PureComponent<
|
||||
: newValue;
|
||||
}
|
||||
|
||||
@autobind
|
||||
async addItem(option: Option) {
|
||||
const {selectedOptions, onChange} = this.props;
|
||||
const newValue = selectedOptions.concat();
|
||||
@ -530,10 +531,10 @@ export default class TagControl extends React.PureComponent<
|
||||
{options.map((item, index) => (
|
||||
<div
|
||||
className={cx('TagControl-sugItem', {
|
||||
'is-disabled': item.disabled || disabled
|
||||
'is-disabled': item.disabled || disabled || reachMax
|
||||
})}
|
||||
key={index}
|
||||
onClick={this.addItem.bind(this, item)}
|
||||
onClick={() => reachMax || this.addItem(item)}
|
||||
>
|
||||
{item.label}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user