UNPKG

koval-ui

Version:

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

3 lines (2 loc) 444 B
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=new Event("change",{bubbles:!1}),u=(n,r,s)=>{o.useEffect(()=>{if(s){const e=n?.current,t=e?.form,a=()=>{e&&e?.dispatchEvent(c),e&&r(c)};return t&&t.addEventListener("change",a),()=>{t&&t.removeEventListener("change",a)}}},[n,s,r])};exports.useRevalidateOnFormChange=u; //# sourceMappingURL=useRevalidateOnFormChange.cjs.map