@fleetbase/ember-ui
Version:
Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.
22 lines (17 loc) • 666 B
JavaScript
import TableCellComponent from './cell';
import { action } from '@ember/object';
export default class TableThComponent extends TableCellComponent {
setupComponent(tableCellNode) {
this.tableCellNode = tableCellNode;
this.setupTableCellNode(tableCellNode);
}
setupTableCellNode(tableCellNode) {
const { column, width } = this.args;
if (column?.width) {
tableCellNode.style.width = typeof column.width === 'number' ? `${column.width}px` : column.width;
}
if (width) {
tableCellNode.style.width = typeof width === 'number' ? `${width}px` : width;
}
}
}