Skip to main content

Action Types

IAction<T>

T is of any type

AttributeTypeDescription
id *number | stringID of action
label *string | (item: T) => stringLabel of action button
iconReactNode | (item: T) => ReactNodeIcon of action button
colorstringColor of action button
confirmationbooleanThe action will open a ConfirmModal for confirmation or cancellation
isItemActionbooleanThe action is an item action, for a single data object
isMassActionbooleanThe action is a mass action, for many data objects
onAction(item: T | T[]) => voidCalled when the action button is clicked, or when the confirmation modal is confirmed
componentPropsRecord<string, unknown> | (item: T) => Record<string, unknown>Extra props for the ActionIcon element, only used in Table
confirmModalPropsIActionConfirmModalProps<T>Extra props for the ConfirmModal component opened on confirmation

IActionConfirmModalProps<T>

T is of any type

AttributeTypeDescription
onCancel(item: T) => false | voidCalled when confirmation is modal is canceled
onClose() => voidCalled when confirmation is modal is closed
onConfirm(item: T) => false | voidCalled when confirmation is modal is confirmed
...-Extends IConfirmModalProps, omitting onCancel, onClose, onConfirm and opened