demarches-normaliennes/app/components/editable_champ/address_component.rb
2024-07-05 09:36:33 +02:00

16 lines
452 B
Ruby

class EditableChamp::AddressComponent < EditableChamp::EditableChampBaseComponent
def dsfr_input_classname
'fr-select'
end
def react_props
react_input_opts(id: @champ.input_id,
class: 'fr-mt-1w',
name: @form.field_name(:value),
selected_key: @champ.value,
items: @champ.selected_items,
loader: data_sources_data_source_adresse_path,
minimum_input_length: 2,
allows_custom_value: true)
end
end