Fixes, dump deps.
This commit is contained in:
parent
5eca76ac5e
commit
55611a63e9
@ -13,11 +13,11 @@
|
||||
"author": "trading_peter",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@lit-labs/virtualizer": "^1.0.1",
|
||||
"@tp/helpers": "^1.1.3",
|
||||
"@tp/tp-checkbox": "^1.0.4",
|
||||
"@lit-labs/virtualizer": "^2.0.7",
|
||||
"@tp/helpers": "^2.1.0",
|
||||
"@tp/tp-checkbox": "^1.0.7",
|
||||
"@tp/tp-icon": "^1.0.1",
|
||||
"@tp/tp-scroll-threshold": "^1.0.0",
|
||||
"lit": "^2.2.6"
|
||||
"lit": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
18
tp-table.js
18
tp-table.js
@ -182,12 +182,7 @@ export class TpTable extends DomQuery(LitElement) {
|
||||
|
||||
return html`
|
||||
<div class="wrap">
|
||||
<div id="tableHeader" part="header" class="list-headline" @track=${this._colResizeTracked}>
|
||||
${this.selectable ? html`
|
||||
<div class="select-col" part="chkAll"><tp-checkbox @toggled=${e => this._checkedChanged(e)}></tp-checkbox></div>
|
||||
` : null}
|
||||
${columns.map(column => this.renderColumnHeader(column))}
|
||||
</div>
|
||||
${this.renderTableHeader(columns)}
|
||||
<div class="list" @row-selection-changed=${(e) => this._selectionChanged(e)}>
|
||||
${this._emptyMessage}
|
||||
<lit-virtualizer id="virtualList" part="list" @scroll=${this._onScroll} scroller .items=${items} .renderItem=${(item, idx) => this.renderItem(item, idx, columns, this._selItems.has(this.getItemId(item)))}></lit-virtualizer>
|
||||
@ -198,6 +193,17 @@ export class TpTable extends DomQuery(LitElement) {
|
||||
`;
|
||||
}
|
||||
|
||||
renderTableHeader(columns) {
|
||||
return html`
|
||||
<div id="tableHeader" part="header" class="list-headline" @track=${this._colResizeTracked}>
|
||||
${this.selectable ? html`
|
||||
<div class="select-col" part="chkAll"><tp-checkbox @toggled=${e => this._checkedChanged(e)}></tp-checkbox></div>
|
||||
` : null}
|
||||
${columns.map(column => this.renderColumnHeader(column))}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
renderColumnHeader(column) {
|
||||
if (column.visible !== true && column.required !== true) return null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user