AshFormBuilder.Theme.MishkaTheme
(AshFormBuilder v0.2.0)
View Source
Strict MishkaChelekom integration theme for AshFormBuilder.
This theme strictly utilizes MishkaChelekom components from your deps,
providing first-class support for many-to-many relationships via the
searchable combobox component.
Setup
Ensure mishka_chelekom is in your deps:
{:mishka_chelekom, "~> 0.0.8"}Generate the required components:
mix mishka.ui.gen.component text_field mix mishka.ui.gen.component textarea_field mix mishka.ui.gen.component native_select mix mishka.ui.gen.component checkbox_field mix mishka.ui.gen.component number_field mix mishka.ui.gen.component email_field mix mishka.ui.gen.component password_field mix mishka.ui.gen.component date_time_field mix mishka.ui.gen.component url_field mix mishka.ui.gen.component comboboxConfigure the theme:
config :ash_form_builder, :theme, AshFormBuilder.Theme.MishkaTheme
Many-to-Many with Combobox
The :multiselect_combobox type renders a searchable multi-select using
<MishkaChelekom.Components.Combobox.combobox>. Pass custom options via opts:
field :specialties do
type :multiselect_combobox
opts [
search_event: "search_specialties",
debounce: 300,
placeholder: "Search specialties..."
]
endStrict Component Usage
This theme ONLY uses:
MishkaChelekom.Components.Combobox.comboboxfor :multiselect_comboboxMishkaChelekom.Components.TextField.text_fieldfor text/email/password/url/telMishkaChelekom.Components.TextareaField.textarea_fieldfor :textareaMishkaChelekom.Components.NativeSelect.native_selectfor :selectMishkaChelekom.Components.CheckboxField.checkbox_fieldfor :checkboxMishkaChelekom.Components.NumberField.number_fieldfor :numberMishkaChelekom.Components.DateTimeField.date_time_fieldfor :date/:datetime