Skip to content

Commit

Permalink
Fix: Regression after Ember 2.12 update for "Backtracking re-render" (
Browse files Browse the repository at this point in the history
…#55)

That should do it.
  • Loading branch information
alexdiliberto authored and crodriguez1a committed Apr 1, 2017
1 parent e569c7d commit 9afee52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions addon/components/bulma-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import layout from '../templates/components/bulma-checkbox';

const {
get,
A: emberArray
set
} = Ember;

export default BulmaInput.extend({
layout,

classNames: ['checkbox'],
type: 'checkbox',
// Bindings are not comprehensive. More complex implementations should use a native element with classes applied
Expand All @@ -21,7 +22,8 @@ export default BulmaInput.extend({
init() {
this._super(...arguments);

// Removing the inherited input class name (as it breaks the styling)
emberArray(get(this, 'classNames')).removeObject('input');
// classNames reset
// Remove the inherited `input` class name (as it breaks the styling)
set(this, 'classNames', get(this, 'classNames').filter((name) => name !== 'input'));
}
});
8 changes: 5 additions & 3 deletions addon/components/bulma-radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import layout from '../templates/components/bulma-checkbox';

const {
get,
A: emberArray
set
} = Ember;

export default BulmaInput.extend({
layout,

classNames: ['radio'],
type: 'radio',
// Bindings are not comprehensive. More complex implementations should use a native element with classes applied
Expand All @@ -21,7 +22,8 @@ export default BulmaInput.extend({
init() {
this._super(...arguments);

// Remove the inherited input class name (as it breaks the styling)
emberArray(get(this, 'classNames')).removeObject('input');
// classNames reset
// Remove the inherited `input` class name (as it breaks the styling)
set(this, 'classNames', get(this, 'classNames').filter((name) => name !== 'input'));
}
});

0 comments on commit 9afee52

Please sign in to comment.