# `PhoenixKitManufacturing.Web.Components.ColumnModal`
[🔗](https://github.com/BeamLabEU/phoenix_kit_manufacturing/blob/0.4.1/lib/phoenix_kit_manufacturing/web/components/column_modal.ex#L1)

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.

# `column_modal`

## Attributes

* `id` (`:string`) - Defaults to `"manufacturing-column-modal"`.
* `show` (`:boolean`) (required)
* `column_config` (`:atom`) (required)
* `selected` (`:list`) (required)
* `active_filters` (`:list`) - Defaults to `[]`.
* `temp_selected` (`:list`) - Defaults to `nil`.
* `temp_active_filters` (`:list`) - Defaults to `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
