Various fixes
This commit is contained in:
@ -6,6 +6,7 @@ Copyright (c) 2021 EDV Wasmeier
|
||||
import '@tp/tp-checkbox/tp-checkbox.js';
|
||||
import { LitElement, html, css } from 'lit';
|
||||
import { DomQuery } from '@tp/helpers/dom-query.js';
|
||||
import { reach } from '@tp/helpers/reach.js';
|
||||
|
||||
/**
|
||||
# ef-base-table-item
|
||||
@ -98,7 +99,7 @@ class TpTableItem extends BaseElement {
|
||||
}
|
||||
|
||||
renderColumn(column, item) {
|
||||
return html`<div part="cell">${item[column.name]}</div>`;
|
||||
return html`<div part="cell">${reach(column.name, item)}</div>`;
|
||||
}
|
||||
|
||||
async updated(changes) {
|
||||
@ -115,8 +116,10 @@ class TpTableItem extends BaseElement {
|
||||
if (changes.has('index')) {
|
||||
if (this.index % 2 === 0) {
|
||||
this.part.add('odd');
|
||||
this.part.remove('even');
|
||||
} else {
|
||||
this.part.remove('odd');
|
||||
this.part.add('even');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user