mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Show max tag error and prevent search (#26233)
Show the tag limit and prevent searches when max is 0
This commit is contained in:
@ -371,7 +371,9 @@ export default Component.extend(
|
||||
},
|
||||
|
||||
addError(error) {
|
||||
this.errorsCollection.pushObject(error);
|
||||
if (!this.errorsCollection.includes(error)) {
|
||||
this.errorsCollection.pushObject(error);
|
||||
}
|
||||
|
||||
this._safeAfterRender(() => this.popper && this.popper.update());
|
||||
},
|
||||
@ -649,6 +651,12 @@ export default Component.extend(
|
||||
return [];
|
||||
}
|
||||
|
||||
if (this.selectKit.options.maximum === 0) {
|
||||
this.set("selectKit.isLoading", false);
|
||||
this.set("selectKit.hasNoContent", false);
|
||||
return [];
|
||||
}
|
||||
|
||||
content = content.concat(makeArray(result));
|
||||
content = this.selectKit.modifyContent(content).filter(Boolean);
|
||||
|
||||
|
Reference in New Issue
Block a user