From cfad38184ddefec94bcaa5f3488788a74e32cada Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 18 May 2020 17:44:47 +0200 Subject: [PATCH] FIX: improves and fixes a regression with category-selector (#9821) --- .../select-kit/app/components/category-selector.js | 4 ++++ .../components/multi-select/selected-category.hbs | 8 +++++--- .../stylesheets/common/select-kit/category-selector.scss | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/select-kit/app/components/category-selector.js b/app/assets/javascripts/select-kit/app/components/category-selector.js index 20475d7570c..96ee7c0e782 100644 --- a/app/assets/javascripts/select-kit/app/components/category-selector.js +++ b/app/assets/javascripts/select-kit/app/components/category-selector.js @@ -43,6 +43,10 @@ export default MultiSelectComponent.extend({ ); }, + modifyComponentForRow() { + return "category-row"; + }, + actions: { onChange(values) { this.attrs.onChange( diff --git a/app/assets/javascripts/select-kit/app/templates/components/multi-select/selected-category.hbs b/app/assets/javascripts/select-kit/app/templates/components/multi-select/selected-category.hbs index dd729183a8b..5d35d2b7941 100644 --- a/app/assets/javascripts/select-kit/app/templates/components/multi-select/selected-category.hbs +++ b/app/assets/javascripts/select-kit/app/templates/components/multi-select/selected-category.hbs @@ -1,4 +1,6 @@ -
- {{badge}} - {{d-icon "times"}} +
+
+ {{badge}} + {{d-icon "times"}} +
diff --git a/app/assets/stylesheets/common/select-kit/category-selector.scss b/app/assets/stylesheets/common/select-kit/category-selector.scss index 0f2ba6c4193..972be8bae4a 100644 --- a/app/assets/stylesheets/common/select-kit/category-selector.scss +++ b/app/assets/stylesheets/common/select-kit/category-selector.scss @@ -9,5 +9,13 @@ } } } + + .category-row { + max-width: 100%; + + .topic-count { + margin-left: 0.25em; + } + } } }