Fixes, dump deps.
This commit is contained in:
parent
5eca76ac5e
commit
55611a63e9
@ -13,11 +13,11 @@
|
|||||||
"author": "trading_peter",
|
"author": "trading_peter",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lit-labs/virtualizer": "^1.0.1",
|
"@lit-labs/virtualizer": "^2.0.7",
|
||||||
"@tp/helpers": "^1.1.3",
|
"@tp/helpers": "^2.1.0",
|
||||||
"@tp/tp-checkbox": "^1.0.4",
|
"@tp/tp-checkbox": "^1.0.7",
|
||||||
"@tp/tp-icon": "^1.0.1",
|
"@tp/tp-icon": "^1.0.1",
|
||||||
"@tp/tp-scroll-threshold": "^1.0.0",
|
"@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`
|
return html`
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div id="tableHeader" part="header" class="list-headline" @track=${this._colResizeTracked}>
|
${this.renderTableHeader(columns)}
|
||||||
${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>
|
|
||||||
<div class="list" @row-selection-changed=${(e) => this._selectionChanged(e)}>
|
<div class="list" @row-selection-changed=${(e) => this._selectionChanged(e)}>
|
||||||
${this._emptyMessage}
|
${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>
|
<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) {
|
renderColumnHeader(column) {
|
||||||
if (column.visible !== true && column.required !== true) return null;
|
if (column.visible !== true && column.required !== true) return null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user