PhoenixKitManufacturing. Web. Components. ColumnModal
(PhoenixKitManufacturing v0.3.2)
Copy Markdown
View Source
Function component for the "Customize columns" modal used by Manufacturing's admin list LiveViews.
Layout: two columns inside the modal.
- Selected (left) — drag to reorder. Each row also exposes a filter toggle for filterable columns; toggled state persists alongside column order.
- Available (right) — click to add.
The host LiveView must implement these handle_event/3 callbacks (provided
by PhoenixKitManufacturing.Web.ColumnManagement):
"hide_column_modal""add_column"(%{"column_id" => id})"remove_column"(%{"column_id" => id})"toggle_filter"(%{"column_id" => id})"reorder_selected_columns"(%{"ordered_ids" => [...]})"update_table_columns"(form submit,%{"column_order" => csv})"reset_to_defaults"
This is a 1:1 adaptation of PhoenixKitWarehouse.Web.Components.ColumnModal
— same markup and event contract, only the module namespace and Gettext
backend changed. DraggableList is core's
PhoenixKitWeb.Components.Core.DraggableList — no extra dependency needed.