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:
Natalie Tay
2024-03-19 12:47:18 +08:00
committed by GitHub
parent 11099434b5
commit f30cc5ebed
3 changed files with 39 additions and 1 deletions

View File

@ -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);