fix(core): update
This commit is contained in:
parent
a55db621ef
commit
f64da93cf9
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.201',
|
version: '1.0.202',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,15 @@ export const demoFunc = () => html`
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'preview',
|
||||||
|
type: ['doubleClick', 'contextmenu'],
|
||||||
|
iconName: 'eye',
|
||||||
|
actionFunc: async (itemArg) => {
|
||||||
|
alert(itemArg.amount);
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
}
|
||||||
] as (ITableAction<ITableDemoData>)[] as any}"
|
] as (ITableAction<ITableDemoData>)[] as any}"
|
||||||
.displayFunction=${(itemArg) => {
|
.displayFunction=${(itemArg) => {
|
||||||
return {
|
return {
|
||||||
|
@ -37,7 +37,7 @@ export interface ITableAction<T = any> {
|
|||||||
/**
|
/**
|
||||||
* the type of the action
|
* 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
|
* allows to check if the action is relevant for the given item
|
||||||
* @param itemArg
|
* @param itemArg
|
||||||
@ -399,7 +399,11 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
>
|
>
|
||||||
${headings.map(
|
${headings.map(
|
||||||
(headingArg) => html`
|
(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>
|
<div class="innerCellContainer">${transformedItem[headingArg]}</div>
|
||||||
</td>
|
</td>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user