Skip to content

Commit

Permalink
Fix TableRow model component. Closes #2697
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Apr 15, 2020
1 parent 24a27f6 commit 9a3d0e1
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/dom_components/model/ComponentTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,12 @@ export default Component.extend(
{
defaults: {
...Component.prototype.defaults,
type: 'row',
tagName: 'tr',
draggable: ['thead', 'tbody', 'tfoot'],
droppable: ['th', 'td']
},

initialize(o, opt) {
Component.prototype.initialize.apply(this, arguments);

// Clean the row from non cell components
const cells = [];
const components = this.get('components');
components.each(model => model.is('cell') && cells.push(model));
components.reset(cells);
}
},
{
isComponent(el) {
let result = '';

if (el.tagName == 'TR') {
result = { type: 'row' };
}

return result;
}
isComponent: el => el.tagName == 'TR' && true
}
);

0 comments on commit 9a3d0e1

Please sign in to comment.