UNPKG

@3mo/data-grid

Version:
48 lines (44 loc) 1.25 kB
import { __decorate } from "tslib"; import { css, component, html } from '@a11d/lit'; import { DataGridRow } from './DataGridRow.js'; let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow { static get styles() { return css ` ${super.styles} :host { display: grid; grid-template-columns: subgrid; grid-column: -1 / 1; min-height: var(--mo-data-grid-row-height); } mo-flex { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } #selectionContainer { height: var(--mo-data-grid-row-height); } `; } updated(...parameters) { super.updated(...parameters); const subDataGrid = this.renderRoot.querySelector('[instanceof*=mo-data-grid]'); if (subDataGrid) { subDataGrid.preventVerticalContentScroll = true; } } get rowTemplate() { return html ` ${this.detailsExpanderTemplate} ${this.selectionTemplate} ${this.dataGrid.columns.map(column => this.getCellTemplate(column))} ${this.fillerTemplate} ${this.contextMenuIconButtonTemplate} `; } }; DataGridDefaultRow = __decorate([ component('mo-data-grid-default-row') ], DataGridDefaultRow); export { DataGridDefaultRow };