UNPKG

@hitachivantara/uikit-react-core

Version:
10 lines (9 loc) 380 B
//#region src/Input/utils.tsx /** Changes a given `input`'s `value`, triggering its `onChange` */ var changeInputValue = (input, value = "") => { const event = new Event("input", { bubbles: true }); (Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(input, value); input?.dispatchEvent(event); }; //#endregion export { changeInputValue };