UNPKG

koval-ui

Version:

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

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