2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-10-03 18:14:42 +02:00
|
|
|
class EditableChamp::AddressComponent < EditableChamp::EditableChampBaseComponent
|
2024-04-11 09:06:00 +02:00
|
|
|
def dsfr_input_classname
|
|
|
|
'fr-select'
|
|
|
|
end
|
2024-05-06 18:09:10 +02:00
|
|
|
|
|
|
|
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
|
2022-08-12 10:45:04 +02:00
|
|
|
end
|