fix(champ): save departement name without code prefix
This commit is contained in:
parent
0a61056ea8
commit
ed2cbdc966
1 changed files with 2 additions and 2 deletions
|
@ -93,10 +93,10 @@ function ComboCommunesSearch(params) {
|
||||||
placeholder={placeholderDepartement}
|
placeholder={placeholderDepartement}
|
||||||
addForeignDepartement={false}
|
addForeignDepartement={false}
|
||||||
required={params.mandatory}
|
required={params.mandatory}
|
||||||
onChange={(value, result) => {
|
onChange={(_, result) => {
|
||||||
setDepartementCode(result?.code);
|
setDepartementCode(result?.code);
|
||||||
if (hiddenDepartementField && hiddenCodeDepartementField) {
|
if (hiddenDepartementField && hiddenCodeDepartementField) {
|
||||||
hiddenDepartementField.setAttribute('value', value);
|
hiddenDepartementField.setAttribute('value', result?.nom);
|
||||||
hiddenCodeDepartementField.setAttribute('value', result?.code);
|
hiddenCodeDepartementField.setAttribute('value', result?.code);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue