FIX: select-kit components not being hidden.

FIX: select-kit components not being hidden.

diff --git a/app/assets/javascripts/select-kit/addon/templates/components/multi-select.hbs b/app/assets/javascripts/select-kit/addon/templates/components/multi-select.hbs
index e0d1f54..5c7b93a 100644
--- a/app/assets/javascripts/select-kit/addon/templates/components/multi-select.hbs
+++ b/app/assets/javascripts/select-kit/addon/templates/components/multi-select.hbs
@@ -1,4 +1,4 @@
-{{#unless isHidden}}
+{{#unless selectKit.isHidden}}
   {{component selectKit.options.headerComponent
     tabindex=tabindex
     value=value
diff --git a/app/assets/javascripts/select-kit/addon/templates/components/single-select.hbs b/app/assets/javascripts/select-kit/addon/templates/components/single-select.hbs
index a3b71cb..7fac16c 100644
--- a/app/assets/javascripts/select-kit/addon/templates/components/single-select.hbs
+++ b/app/assets/javascripts/select-kit/addon/templates/components/single-select.hbs
@@ -1,4 +1,4 @@
-{{#unless isHidden}}
+{{#unless selectKit.isHidden}}
   {{component selectKit.options.headerComponent
     tabindex=tabindex
     value=value
diff --git a/app/assets/stylesheets/common/select-kit/select-kit.scss b/app/assets/stylesheets/common/select-kit/select-kit.scss
index 4080d1d..887974b 100644
--- a/app/assets/stylesheets/common/select-kit/select-kit.scss
+++ b/app/assets/stylesheets/common/select-kit/select-kit.scss
@@ -7,10 +7,6 @@
   vertical-align: middle;
   user-select: none;
 
-  &.is-hidden {
-    display: none !important;
-  }
-
   &.is-disabled {
     pointer-events: none;
   }
diff --git a/test/javascripts/acceptance/composer-actions-test.js b/test/javascripts/acceptance/composer-actions-test.js
index f421ec4..2ee96e3 100644
--- a/test/javascripts/acceptance/composer-actions-test.js
+++ b/test/javascripts/acceptance/composer-actions-test.js
@@ -177,6 +177,7 @@ QUnit.test("hide component if no content", async assert => {
   await composerActions.selectRowByValue("reply_as_private_message");
 
   assert.ok(composerActions.el().hasClass("is-hidden"));
+  assert.equal(composerActions.el().children().length, 0);
 
   await click("button#create-topic");
   await composerActions.expand();

GitHub sha: 52580605

This commit appears in #9979 which was merged by tgxworld.

Nice! Happy to see this gone.

1 Like