Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: display search on large category-drop and tag-drop

Joffrey JAFFEUXce507b7957d3
diff --git a/app/assets/javascripts/select-kit/components/category-drop.js.es6 b/app/assets/javascripts/select-kit/components/category-drop.js.es6
index 50e938439b2..6cf0052e1f9 100644
--- a/app/assets/javascripts/select-kit/components/category-drop.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-drop.js.es6
@@ -36,6 +36,11 @@ export default ComboBoxComponent.extend({
});
},
+ @computed("content")
+ filterable(content) {
+ return content.length >= 15;
+ },
+
@computed("allCategoriesUrl", "allCategoriesLabel", "noCategoriesUrl", "noCategoriesLabel")
collectionHeader(allCategoriesUrl, allCategoriesLabel, noCategoriesUrl, noCategoriesLabel) {
let shortcuts = "";
diff --git a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 b/app/assets/javascripts/select-kit/components/tag-drop.js.es6
index a91a6ae7739..23092bb6a2a 100644
--- a/app/assets/javascripts/select-kit/components/tag-drop.js.es6
+++ b/app/assets/javascripts/select-kit/components/tag-drop.js.es6
@@ -31,6 +31,11 @@ export default ComboBoxComponent.extend({
return true;
},
+ @computed("content")
+ filterable(content) {
+ return content.length >= 15;
+ },
+
computeHeaderContent() {
let content = this.baseHeaderComputedContent();