fix(combobox): form submission when form has combobox and input file without file selected

This commit is contained in:
Colin Darie 2023-01-30 18:22:53 +01:00
parent a40c39fc9c
commit efea44b9ba

View file

@ -17,8 +17,11 @@ export function useDeferredSubmit(input?: HTMLInputElement): {
runCallback();
if (
!Array.from(form.elements).some((e) =>
e.hasAttribute('data-direct-upload-url')
!Array.from(form.elements).some(
(e) =>
e.hasAttribute('data-direct-upload-url') &&
'value' in e &&
e.value != ''
)
) {
form.submit();