MCPcopy Index your code
hub / github.com/UI5/webcomponents / submitForm

Function submitForm

packages/base/src/features/InputElementsFormSupport.ts:64–76  ·  view source on GitHub ↗
(element: UI5Element)

Source from the content-addressed store, hash-verified

62};
63
64const submitForm = async (element: UI5Element) => {
65 const form = getAssociatedForm(element);
66
67 if (!form) {
68 return;
69 }
70
71 const elements = [...form.elements] as Array<IFormInputElement | UI5Element>;
72
73 await Promise.all(elements.map(el => { return isInputElement(el) ? setFormValidity(el) : Promise.resolve(); }));
74
75 form.requestSubmit();
76};
77
78const resetForm = (element: UI5Element) => {
79 const form = getAssociatedForm(element);

Callers 8

_onclickMethod · 0.85
_onInputRequestSubmitMethod · 0.85
_onInputRequestSubmitMethod · 0.85
_handleEnterMethod · 0.85
_keydownMethod · 0.85
_onInputRequestSubmitMethod · 0.85
_onkeydownMethod · 0.85
_handleChangeMethod · 0.85

Calls 4

getAssociatedFormFunction · 0.85
isInputElementFunction · 0.85
setFormValidityFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…