mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
FIX: ensures mini-tag-chooser display min tags req if no selection (#9303)
This commit is contained in:
parent
a3345057f2
commit
fa5ba6beb8
@ -77,6 +77,20 @@ export default ComboBox.extend(TagsMixin, {
|
||||
);
|
||||
}),
|
||||
|
||||
modifyNoSelection() {
|
||||
if (this.selectKit.options.minimum) {
|
||||
const minimum = parseInt(this.selectKit.options.minimum, 10);
|
||||
if (minimum > 0) {
|
||||
return this.defaultItem(
|
||||
null,
|
||||
I18n.t("select_kit.min_content_not_reached", { count: minimum })
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return this._super(...arguments);
|
||||
},
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user