fix(core): update
This commit is contained in:
parent
a55db621ef
commit
f64da93cf9
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-catalog',
|
||||
version: '1.0.201',
|
||||
version: '1.0.202',
|
||||
description: 'website for lossless.com'
|
||||
}
|
||||
|
@ -106,6 +106,15 @@ export const demoFunc = () => html`
|
||||
return null;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'preview',
|
||||
type: ['doubleClick', 'contextmenu'],
|
||||
iconName: 'eye',
|
||||
actionFunc: async (itemArg) => {
|
||||
alert(itemArg.amount);
|
||||
return null;
|
||||
},
|
||||
}
|
||||
] as (ITableAction<ITableDemoData>)[] as any}"
|
||||
.displayFunction=${(itemArg) => {
|
||||
return {
|
||||
|
@ -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>
|
||||
`
|
||||
|
Loading…
x
Reference in New Issue
Block a user