fix(core): update
This commit is contained in:
parent
53ac03507d
commit
c68b0c5090
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-catalog',
|
||||
version: '1.0.212',
|
||||
version: '1.0.213',
|
||||
description: 'website for lossless.com'
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ export const demoFunc = () => html`
|
||||
iconName: 'bell',
|
||||
useTableBehaviour: 'upload',
|
||||
type: ['inRow'],
|
||||
actionFunc: async (itemArg) => {
|
||||
alert(itemArg.amount);
|
||||
actionFunc: async (optionsArg) => {
|
||||
alert(optionsArg.item.amount);
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -112,7 +112,7 @@ export const demoFunc = () => html`
|
||||
type: ['doubleClick', 'contextmenu'],
|
||||
iconName: 'eye',
|
||||
actionFunc: async (itemArg) => {
|
||||
alert(itemArg.amount);
|
||||
alert(itemArg.item.amount);
|
||||
return null;
|
||||
},
|
||||
}
|
||||
|
@ -57,7 +57,10 @@ export interface ITableAction<T = any> {
|
||||
* @param itemArg
|
||||
* @returns
|
||||
*/
|
||||
actionFunc: (itemArg: T) => Promise<any>;
|
||||
actionFunc: (optionsArg: {
|
||||
item: T,
|
||||
dataArray: T[],
|
||||
}) => Promise<any>;
|
||||
}
|
||||
|
||||
export type TDisplayFunction<T = any> = (itemArg: T) => object;
|
||||
@ -339,7 +342,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
html`<div
|
||||
class="headerAction"
|
||||
@click=${() => {
|
||||
action.actionFunc(this.selectedDataRow);
|
||||
action.actionFunc({
|
||||
item: this.selectedDataRow,
|
||||
dataArray: this.data
|
||||
});
|
||||
}}
|
||||
>
|
||||
${action.iconName
|
||||
@ -439,7 +445,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
name: action.name,
|
||||
iconName: action.iconName as any,
|
||||
action: async () => {
|
||||
await action.actionFunc(itemArg);
|
||||
await action.actionFunc({
|
||||
item: itemArg,
|
||||
dataArray: this.data
|
||||
});
|
||||
return null;
|
||||
},
|
||||
};
|
||||
@ -460,7 +469,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
actionArg.type.includes('doubleClick')
|
||||
);
|
||||
if (wantedAction) {
|
||||
wantedAction.actionFunc(itemArg);
|
||||
wantedAction.actionFunc({
|
||||
item: itemArg,
|
||||
dataArray: this.data
|
||||
});
|
||||
}
|
||||
}
|
||||
}}
|
||||
@ -477,7 +489,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
${this.getActionsForType('inRow').map(
|
||||
(actionArg) => html`<div
|
||||
class="action"
|
||||
@click=${() => actionArg.actionFunc(itemArg)}
|
||||
@click=${() => actionArg.actionFunc({
|
||||
item: itemArg,
|
||||
dataArray: this.data
|
||||
})}
|
||||
>
|
||||
${actionArg.iconName
|
||||
? html`
|
||||
@ -513,7 +528,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
html`<div
|
||||
class="footerAction"
|
||||
@click=${() => {
|
||||
action.actionFunc(this.selectedDataRow);
|
||||
action.actionFunc({
|
||||
item: this.selectedDataRow,
|
||||
dataArray: this.data
|
||||
});
|
||||
}}
|
||||
>
|
||||
${action.iconName
|
||||
|
Loading…
Reference in New Issue
Block a user