Skip to content

DataTableBulkDeleteModal

DataTableBulkDeleteModal(__namedParameters): Element

Defined in: packages/react/src/ui/data-table/DataTableBulkDeleteModal.tsx:52

Confirmation modal for bulk delete actions.

Shows count of items to be deleted and warns user that action cannot be undone. Parent component is responsible for calling the remove mutation.

DataTableBulkDeleteModalProps

Element

const removeMutation = useMutation(convexMutation(anyApi.vex.remove));
const handleBulkDelete = async () => {
await removeMutation.mutateAsync({ ids: selection.selectedIds });
selection.clearSelection();
};
<DataTableBulkDeleteModal
open={deleteModalOpen}
onOpenChange={setDeleteModalOpen}
selectedCount={selection.selectedIds.length}
onConfirm={handleBulkDelete}
isDeleting={removeMutation.isPending}
entityName="posts"
/>