SelectoComponents.EnhancedTable.BulkActions (selecto_components v0.4.8)

Bulk actions interface for performing operations on multiple selected records.

Bulk actions should come from domain action contracts and render as generated ActionFormModal entries.

Link to this section Summary

Functions

Set all row IDs for selection operations.

Link to this section Functions

Link to this function

set_all_row_ids(component_id, row_ids)

Set all row IDs for selection operations.

Call this from the parent component to provide IDs for select all functionality.

example

Example

def handle_info({:request_all_row_ids, pid}, socket) do
  ids = Enum.map(socket.assigns.rows, & &1.id)
  send_update(SelectoComponents.EnhancedTable.BulkActions,
    id: "bulk-actions",
    all_row_ids: ids
  )
  {:noreply, socket}
end