SelectoComponents.Form.ListPickerOperations (selecto_components v0.4.5)

Handles list picker operations for SelectoComponents forms.

This module contains the business logic for:

  • Adding items to picker lists (selected columns, order_by, group_by, aggregate)
  • Removing items from picker lists
  • Reordering items within picker lists (move up/down)
  • Updating view configuration after list changes

Link to this section Summary

Functions

Add an item to a picker list in the view configuration.

Move an item up or down in a picker list.

Remove an item from a picker list in the view configuration.

Reorder an item in a picker list by dropping it onto another item.

Send an update to the view form component after a list change.

Link to this section Functions

Link to this function

add_item_to_list(view_config, view, list, item)

Add an item to a picker list in the view configuration.

Returns the updated view_config with the item appended to the specified list.

Link to this function

move_item_in_list(view_config, view, list, uuid, direction)

Move an item up or down in a picker list.

Direction should be "up" or "down". Returns the updated view_config with the item moved, or the original view_config if item not found.

Link to this function

remove_item_from_list(view_config, view, list, item)

Remove an item from a picker list in the view configuration.

Returns the updated view_config with the item removed from the specified list.

Link to this function

reorder_item_in_list(view_config, view, list, dragged_uuid, target_uuid)

Reorder an item in a picker list by dropping it onto another item.

Returns the updated view_config with the dragged item inserted at the target item's position.

Link to this function

send_view_update(view_module, updated_view_config, socket_assigns)

Send an update to the view form component after a list change.

This ensures the UI reflects the latest view_config state.