PhoenixKitCRM.Web.ColumnModal (PhoenixKitCRM v0.2.1)

Copy Markdown View Source

Function component that renders the "Customize columns" modal used by both RoleView and OrganizationsView. UX mirrors PhoenixKit.Users table column picker: drag-to-reorder selected columns on the left, click-to-add available columns on the right.

The host LiveView must implement these handle_event/3 callbacks (provided by PhoenixKitCRM.Web.ColumnManagement):

  • "hide_column_modal"
  • "add_column" (%{"column_id" => id})
  • "remove_column" (%{"column_id" => id})
  • "reorder_selected_columns" (%{"ordered_ids" => [...]})
  • "update_table_columns" (form submit, %{"column_order" => csv})
  • "reset_to_defaults"

Summary

Functions

column_modal(assigns)

Attributes

  • show (:boolean) (required)
  • scope (:any) (required)
  • selected (:list) (required)
  • temp_selected (:list) - Defaults to nil.