fix(linked_drop_down): in repetiton the second choice is saved

the filter was not applied in repetition block so an additional empty input was send which overrided the real value
This commit is contained in:
simon lehericey 2022-09-29 14:50:02 +02:00
parent 16d19f7b32
commit 7d547e5e11

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;
}
}