Browse Source

Refactor ComponentTableRow

pull/652/head
Artur Arseniev 8 years ago
parent
commit
1812e16065
  1. 2
      src/dom_components/model/Component.js
  2. 6
      src/dom_components/model/ComponentTableRow.js

2
src/dom_components/model/Component.js

@ -178,7 +178,7 @@ module.exports = Backbone.Model.extend(Styleable).extend({
* // -> false
*/
is(type) {
return !!this.get('type') == type;
return !!(this.get('type') == type);
},

6
src/dom_components/model/ComponentTableRow.js

@ -15,11 +15,7 @@ module.exports = Component.extend({
// Clean the row from non cell components
const cells = [];
const components = this.get('components');
components.each(model => {
if (model.get('type') == 'cell') {
cells.push(model);
}
});
components.each(model => model.is('cell') && cells.push(model));
components.reset(cells);
}

Loading…
Cancel
Save