|
|
|
@ -1,11 +1,12 @@ |
|
|
|
import Component from './Component'; |
|
|
|
import { toLowerCase } from 'utils/mixins'; |
|
|
|
import { toLowerCase } from '../../utils/mixins'; |
|
|
|
|
|
|
|
const type = 'tbody'; |
|
|
|
|
|
|
|
export default class ComponentTableBody extends Component { |
|
|
|
get defaults() { |
|
|
|
return { |
|
|
|
// @ts-ignore
|
|
|
|
...super.defaults, |
|
|
|
type, |
|
|
|
tagName: type, |
|
|
|
@ -16,9 +17,9 @@ export default class ComponentTableBody extends Component { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
initialize(o, opt) { |
|
|
|
Component.prototype.initialize.apply(this, arguments); |
|
|
|
const components = this.get('components'); |
|
|
|
initialize(props: any, opts: any) { |
|
|
|
super.initialize(props, opts); |
|
|
|
const components = this.get('components')!; |
|
|
|
let columns = this.get('columns'); |
|
|
|
let rows = this.get('rows'); |
|
|
|
|
|
|
|
@ -47,5 +48,8 @@ export default class ComponentTableBody extends Component { |
|
|
|
components.add(rowsToAdd); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
static isComponent(el: HTMLElement) { |
|
|
|
return toLowerCase(el.tagName) === type; |
|
|
|
} |
|
|
|
} |
|
|
|
ComponentTableBody.isComponent = el => toLowerCase(el.tagName) === type; |