refactor(dossier): move dossier submit action in to a new form

This commit is contained in:
Paul Chavard 2022-10-11 11:33:09 +02:00
parent dd38fa4458
commit 78a1323fc2
3 changed files with 85 additions and 15 deletions

View file

@ -277,6 +277,16 @@ export function isNumeric(s: string) {
return !isNaN(n) && isFinite(n);
}
export function isButtonElement(
element: Element
): element is HTMLButtonElement {
return (
element.tagName == 'BUTTON' ||
(element.tagName == 'INPUT' &&
(element as HTMLInputElement).type == 'submit')
);
}
export function isSelectElement(
element: HTMLElement
): element is HTMLSelectElement {