Lotus.Web.MultiSelectComponent (Lotus Web v0.14.5)
View SourceA Tailwind-styled, accessible multi-select dropdown with search functionality.
Props:
- id - required, base id for button & listbox
- name - required, posted param name
- options - required, list of {label, value}
- value - current value (comma-separated string or list)
- label - optional label text
- prompt - optional prompt text when no values are selected
- disabled - boolean
- errors - list of error strings (shown under the field)
- floating_label - boolean, render as fieldset or regular
- show_icons - boolean, show icons in options
Emits:
- updates hidden
<input name>elements sophx-changeon the surrounding form receives the change as usual.
Summary
Functions
Callback implementation for Phoenix.LiveComponent.handle_event/3.
Callback implementation for Phoenix.LiveComponent.update/2.
Functions
Callback implementation for Phoenix.LiveComponent.handle_event/3.
Attributes
id(:string) (required)name(:string) (required)options(:list) (required)value(:any) - Defaults tonil.label(:string) - Defaults tonil.floating_label(:boolean) - Defaults tofalse.prompt(:string) - Defaults tonil.search_prompt(:string) - Defaults to"Search".disabled(:boolean) - Defaults tofalse.errors(:list) - Defaults to[].show_icons(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.
Callback implementation for Phoenix.LiveComponent.update/2.