SelectoComponents.Form.EventHandlers.ListOperations (selecto_components v0.4.5)

Event handlers for list picker operations.

This module handles operations on list-based view configurations such as:

  • Adding fields to aggregate/group_by lists
  • Removing fields from lists
  • Reordering items in lists (move up/down)

These operations are typically triggered by the ListPicker component and update the view configuration for aggregate, graph, and detail views.

imported-by

Imported by

This module is automatically imported when using SelectoComponents.Form.

info-messages-handled

Info Messages Handled

  • {:list_picker_add, view, list, item} - Add item to list
  • {:list_picker_remove, view, list, item} - Remove item from list
  • {:list_picker_move, view, list, uuid, direction} - Reorder item in list
  • {:list_picker_reorder, view, list, dragged_uuid, target_uuid} - Drag/drop reorder

design-pattern

Design Pattern

All list operations follow the same pattern:

  1. Update view_config with the list change
  2. Find the relevant view module
  3. Send update to the view module for re-rendering
  4. Return updated socket

List operations do NOT trigger query execution - they only update the configuration. Users must click "Apply" to execute with the new configuration.