Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
608 B

const Component = require('./Component');
module.exports = Component.extend(
{
defaults: {
...Component.prototype.defaults,
type: 'table',
tagName: 'table',
droppable: ['tbody', 'thead', 'tfoot']
},
initialize(o, opt) {
Component.prototype.initialize.apply(this, arguments);
const components = this.get('components');
!components.length && components.add({ type: 'tbody' });
}
},
{
isComponent(el) {
let result = '';
if (el.tagName == 'TABLE') {
result = { type: 'table' };
}
return result;
}
}
);