Files
mixtape/zero.Backoffice.UI/app/schemas/list/list-action.ts
T
2021-12-10 14:23:14 +01:00

33 lines
503 B
TypeScript

class ListAction
{
key;
label;
icon;
autoclose = true;
action = () =>
{
console.warn(`[zero] A list action needs a "action" callback`);
};
constructor(key, label, icon, action, autoclose: boolean = true)
{
this.key = key;
this.label = label;
this.icon = icon;
this.action = action;
this.autoclose = autoclose;
}
/**
* Calls the action
* @returns {ListColumn}
*/
call(options)
{
this.action(options);
}
}
export default ListAction;