Browse Source

Move ComponentTableRow to TS

ts-components
Artur Arseniev 4 years ago
parent
commit
e642a51326
  1. 9
      src/dom_components/model/ComponentTableRow.ts

9
src/dom_components/model/ComponentTableRow.js → src/dom_components/model/ComponentTableRow.ts

@ -1,17 +1,20 @@
import Component from './Component'; import Component from './Component';
import { toLowerCase } from 'utils/mixins'; import { toLowerCase } from '../../utils/mixins';
const tagName = 'tr'; const tagName = 'tr';
export default class ComponentTableRow extends Component { export default class ComponentTableRow extends Component {
get defaults() { get defaults() {
return { return {
// @ts-ignore
...super.defaults, ...super.defaults,
tagName, tagName,
draggable: ['thead', 'tbody', 'tfoot'], draggable: ['thead', 'tbody', 'tfoot'],
droppable: ['th', 'td'], droppable: ['th', 'td'],
}; };
} }
}
ComponentTableRow.isComponent = el => toLowerCase(el.tagName) === tagName; static isComponent(el: HTMLElement) {
return toLowerCase(el.tagName) === tagName;
}
}
Loading…
Cancel
Save