magner
Version:
Universal admin panel magnetic to any backend
24 lines (23 loc) • 1.38 kB
TypeScript
import type { ActionFunc, ActionFuncCard, ActionFuncTable, ActionWrapper } from '../../types/utils/actions';
/**
* `action` is used in the ActionButtons in the card forms, table filters and other places. It can
* add any user-defined action and/or emit some action to the parent component. Notice that
* `action` function in the ActionButton is called always before the `emits`.
*
* For better usability, use `actionCard` in the Card page and `actionTable` in the Table page.
*/
export declare const action: ActionFunc;
/**
* `actionCard` extends the logic of `action` function, but it has more useful typings and data in
* the ActionCallback. For example, when `actionCard` is used on the Card page, you can emit
* `'submit'` action to the parent. Pressing on this button would result in submitting the form.
*/
export declare const actionCard: ActionFuncCard;
/**
* `actionTable` extends the logic of `action` function, but it has more useful typings and data in
* the ActionCallback. For example, when `actionTable` is used on the Table page, you can emit
* `'update-table'` action to the parent. Pressing on this button would result in refreshing the table.
*/
export declare const actionTable: ActionFuncTable;
/** Use this function in custom components to invoke any `action` with some `data` inside it */
export declare const actionWrapper: ActionWrapper;