FIX: ensures mini-tag-chooser display min tags req if no selection (#9303)

FIX: ensures mini-tag-chooser display min tags req if no selection (#9303)

diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
index 4f89e38..d8c63c9 100644
--- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
+++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
@@ -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);
 

GitHub sha: fa5ba6be

This commit appears in #9303 which was approved by eviltrout. It was merged by jjaffeux.