FIX: ensures nothing is triggering rendering loop in after render (#6784)

FIX: ensures nothing is triggering rendering loop in after render (#6784)
diff --git a/app/assets/javascripts/select-kit/components/select-kit.js.es6 b/app/assets/javascripts/select-kit/components/select-kit.js.es6
index 36d1a4c..b907e87 100644
--- a/app/assets/javascripts/select-kit/components/select-kit.js.es6
+++ b/app/assets/javascripts/select-kit/components/select-kit.js.es6
@@ -25,10 +25,6 @@ export default Ember.Component.extend(
       "isExpanded",
       "isDisabled",
       "isHidden",
-      "isAbove",
-      "isBelow",
-      "isLeftAligned",
-      "isRightAligned",
       "hasSelection",
       "hasReachedMaximum",
       "hasReachedMinimum"
diff --git a/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6 b/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6
index b6a4fdf..88703fb 100644
--- a/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6
+++ b/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6
@@ -69,8 +69,10 @@ export default Ember.Mixin.create({
   },
 
   _adjustPosition() {
+    if (this.get("isExpanded")) {
+      this._applyDirection();
+    }
     this._applyFixedPosition();
-    this._applyDirection();
     this._positionWrapper();
   },
 
@@ -197,11 +199,15 @@ export default Ember.Mixin.create({
         parentWidth - marginToEdge - bodyWidth + this.get("horizontalOffset") >
         0;
       if (enoughMarginToOppositeEdge) {
-        this.setProperties({ isLeftAligned: true, isRightAligned: false });
+        this.$()
+          .addClass("is-left-aligned")
+          .removeClass("is-right-aligned");
         options.left = this.get("horizontalOffset");
         options.right = "unset";
       } else {
-        this.setProperties({ isLeftAligned: false, isRightAligned: true });
+        this.$()
+          .addClass("is-right-aligned")
+          .removeClass("is-left-aligned");
         options.left = "unset";
         options.right = this.get("horizontalOffset");
       }
@@ -214,10 +220,14 @@ export default Ember.Mixin.create({
     const headerHeight = this._computedStyle(this.$header()[0], "height");
 
     if (hasBelowSpace || (!hasBelowSpace && !hasAboveSpace)) {
-      this.setProperties({ isBelow: true, isAbove: false });
+      this.$()
+        .addClass("is-below")
+        .removeClass("is-above");
       options.top = headerHeight + this.get("verticalOffset");
     } else {
-      this.setProperties({ isBelow: false, isAbove: true });
+      this.$()
+        .addClass("is-above")
+        .removeClass("is-below");
       options.bottom = headerHeight + this.get("verticalOffset");
     }

GitHub
sha: 6ee39007