feat(multiple_drop_down_list): Replace blank option

This commit is contained in:
Corinne Durrmeyer 2024-03-26 15:39:05 +01:00
parent ab6a76ad46
commit ba290110e5
3 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
fr:
prompt: "Sélectionner"

View file

@ -16,4 +16,4 @@
= render NestedForms::OwnedButtonComponent.new(formaction: champs_options_path(@champ.id, option:), http_method: :delete, opt: { aria: {pressed: true }, class: 'fr-tag fr-tag-bug fr-mb-1w fr-mr-1w', id: @champ.checkbox_id(option) }) do
= option
- if @champ.unselected_options.present?
= @form.select :value, @champ.unselected_options, { selected: '', include_blank: '' }, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: 'fr-select fr-mt-2v'
= @form.select :value, @champ.unselected_options, { selected: '', include_blank: false, prompt: t('.prompt') }, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: 'fr-select fr-mt-2v'