MCPcopy Create free account
hub / github.com/dailydotdev/apps / isInForm

Function isInForm

packages/shared/src/hooks/useFormTouched.ts:33–36  ·  view source on GitHub ↗
(target: EventTarget | null)

Source from the content-addressed store, hash-verified

31 }
32
33 const isInForm = (target: EventTarget | null): target is Element =>
34 target instanceof Element &&
35 ((target as HTMLInputElement).form?.id === formId ||
36 !!target.closest(`[id="${formId}"]`));
37 const onEdit = (event: Event) => {
38 if (isInForm(event.target)) {
39 setIsTouched(true);

Callers 2

onEditFunction · 0.85
onPressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected