Merge pull request #7820 from betagouv/fix_linked_drop_down_in_repetition

fix(linked_drop_down): corrige l'enregistrement des dropdown liés dans des blocs répétables
This commit is contained in:
Paul Chavard 2022-09-29 15:18:51 +02:00 committed by GitHub
commit a03b5e7df2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,11 +193,13 @@ export class AutosaveController extends ApplicationController {
private get inputs() {
const element = this.element as HTMLElement;
const inputs = [
...element.querySelectorAll<HTMLInputElement>(
'input:not([type=file]), textarea, select'
)
];
].filter((element) => !element.disabled);
const parent = this.element.closest('.editable-champ-repetition');
if (parent) {
return [
@ -205,6 +207,6 @@ export class AutosaveController extends ApplicationController {
...parent.querySelectorAll<HTMLInputElement>('input[data-id]')
];
}
return inputs.filter((element) => !element.disabled);
return inputs;
}
}