fix(core): update

This commit is contained in:
2023-09-15 17:27:35 +02:00
parent a55db621ef
commit f64da93cf9
3 changed files with 16 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export interface ITableAction<T = any> {
/**
* the type of the action
*/
type: ('inRow' | 'contextmenu' | 'footer' | 'header' | 'preview' | 'keyCombination')[];
type: ('inRow' | 'contextmenu' | 'doubleClick' | 'footer' | 'header' | 'preview' | 'keyCombination')[];
/**
* allows to check if the action is relevant for the given item
* @param itemArg
@ -399,7 +399,11 @@ export class DeesTable<T> extends DeesElement {
>
${headings.map(
(headingArg) => html`
<td>
<td @dblclick=${() => {
const wantedAction = this.dataActions.find((actionArg) => actionArg.type.includes('doubleClick'));
if (!wantedAction) return;
wantedAction.actionFunc(itemArg);
}}>
<div class="innerCellContainer">${transformedItem[headingArg]}</div>
</td>
`