BulkActions Use the KBulkActions component to provide operations on multiple selected rows. It automatically switches between inline action buttons (for 3 or fewer actions) and a dropdown selection menu when more than 3 actions are configured.
Inline Bulk Actions Clear Selection Currently Selected: 2 / 5 items
const inlineActions = [
{ label: 'Export', icon: 'download', type: 'primary', action: (rows) => alert(`Exporting ${rows.length}`) },
{ label: 'Archive', icon: 'folder', type: 'warning', action: (rows) => alert(`Archiving ${rows.length}`) },
{ label: 'Delete', icon: 'trash', type: 'danger', action: (rows) => alert(`Deleting ${rows.length}`) }
]
KBulkActions(
:bulkActions="inlineActions"
:selectedRows="selectedRows"
:selectAll="selectAll"
)
Menu Bulk Actions // With >3 actions, KBulkActions automatically renders a KCombobox selector
KBulkActions(
:bulkActions="multipleActions"
:selectedRows="selectedRows"
:selectAll="selectAll"
)
Configure the KBulkActions component using these attributes.
Name Type Default Description bulkActions IKDatatableAction[]Required Array of action definitions with label, action callback, optional icon, and visibility predicate. selectedRows any[]Required Array of currently selected items to apply actions to. selectAll booleanfalseGlobal selection state (e.g. when all items across all pages are selected). filter IDataFilter | nullundefinedActive filter definition context passed down to action callbacks when selectAll is true.
Property Type Description label stringDisplay name of the action button or dropdown option. action (rows: any[, selectAll: boolean, filter?: any) => void]Callback function executed when the action is triggered. Receives applicable rows, global selectAll flag, and active filter context. icon stringOptional icon name displayed on the action button. iconOnly booleanWhen true, renders icon-only button with a tooltip. type stringSemantic button type: 'default', 'primary', 'success', 'warning', 'danger', 'info'. visible (rowOrRows: any, selectAll?: boolean) => booleanOptional predicate function. Can be defined per-row or as a bulk predicate; KBulkActions filters rows to only applicable items.