rename remaining drop_down_list_enabled_non_empty_options(other: true) -> drop_down_options_with_other

This commit is contained in:
simon lehericey 2024-09-19 17:11:14 +02:00
parent 532f0f48fa
commit 5fc0eb11f5
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
5 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ class EditableChamp::DropDownListComponent < EditableChamp::EditableChampBaseCom
class: 'fr-mt-1w',
name: @form.field_name(:value),
selected_key: @champ.selected,
items: @champ.drop_down_list_enabled_non_empty_options(other: true).map { _1.is_a?(Array) ? _1 : [_1, _1] },
items: @champ.drop_down_options_with_other.map { _1.is_a?(Array) ? _1 : [_1, _1] },
empty_filter_key: @champ.drop_down_other? ? Champs::DropDownListChamp::OTHER : nil,
'aria-describedby': @champ.describedby_id,
'aria-labelledby': @champ.labelledby_id)

View file

@ -22,7 +22,7 @@
= render ReactComponent.new "ComboBox/SingleComboBox", **react_props
- else
= @form.select :value,
@champ.drop_down_list_enabled_non_empty_options(other: true),
@champ.drop_down_options_with_other,
{ selected: @champ.selected, include_blank: true },
required: @champ.required?,
id: @champ.input_id,