UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

19 lines (18 loc) 549 B
"use client"; import { useEffect as t } from "react"; const o = new Event("change", { bubbles: !1 }), h = (r, c, a) => { t(() => { if (a) { const e = r == null ? void 0 : r.current, s = e == null ? void 0 : e.form, n = () => { e && (e == null || e.dispatchEvent(o)), e && c(o); }; return s && s.addEventListener("change", n), () => { s && s.removeEventListener("change", n); }; } }, [r, a, c]); }; export { h as useRevalidateOnFormChange }; //# sourceMappingURL=useRevalidateOnFormChange.js.map