feat(Champ.annuaire_education): add missing fr-input class name

This commit is contained in:
mfo 2024-04-12 07:57:27 +02:00
parent 4d90b1f662
commit c22438fb75
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
2 changed files with 8 additions and 3 deletions

View file

@ -2,4 +2,11 @@ class EditableChamp::AnnuaireEducationComponent < EditableChamp::ComboSearchComp
def dsfr_input_classname
'fr-input'
end
def react_input_opts
opts = input_opts(id: @champ.input_id, required: @champ.required?, aria: { describedby: @champ.describedby_id })
opts[:className] = "#{opts.delete(:class)} fr-mt-1w"
opts
end
end

View file

@ -3,7 +3,5 @@
= @form.hidden_field :value
= @form.hidden_field :external_id
= react_component("ComboAnnuaireEducationSearch",
required: @champ.required?,
id: @champ.input_id,
describedby: @champ.describedby_id,
**react_input_opts,
**react_combo_props)