refactor(autosubmit): split and improuve autosubmit and turbo controller

This commit is contained in:
Paul Chavard 2023-01-11 21:45:41 +01:00
parent 247bd6128e
commit 88866d0413
4 changed files with 106 additions and 23 deletions

View file

@ -290,6 +290,15 @@ export function isCheckboxOrRadioInputElement(
);
}
export function isDateInputElement(
element: HTMLElement & { type?: string }
): element is HTMLInputElement {
return (
element.tagName == 'INPUT' &&
(element.type == 'date' || element.type == 'datetime-local')
);
}
export function isTextInputElement(
element: HTMLElement & { type?: string }
): element is HTMLInputElement {