Skip to content

Commit

Permalink
Merge pull request ember-bootstrap#754 from kaliber5/collapse-transition
Browse files Browse the repository at this point in the history
Fix transition for bs-collapse
  • Loading branch information
simonihmig authored Feb 16, 2019
2 parents 589273c + 0c6a7db commit 8ebeb26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/components/base/bs-collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export default Component.extend({
*/
transitionDuration: 350,

setCollapseSize() {
let { collapseSize: size, collapseDimension: dimension } = this.getProperties('collapseSize', 'collapseDimension');
setCollapseSize(size) {
let dimension = this.get('collapseDimension');

assert(`collapseDimension must be either "width" or "height". ${dimension} given.`, ["width", "height"].includes(dimension));

Expand Down Expand Up @@ -165,9 +165,9 @@ export default Component.extend({

this.setProperties({
transitioning: true,
collapseSize: this.get('collapsedSize'),
active: true
});
this.setCollapseSize(this.get('collapsedSize'));

transitionEnd(this.get('element'), this.get('transitionDuration')).then(() => {
if (this.get('isDestroyed')) {
Expand Down

0 comments on commit 8ebeb26

Please sign in to comment.