@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
11 lines (10 loc) • 373 B
JavaScript
export default ((input, value)=>{
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
if (nativeInputValueSetter !== undefined) {
nativeInputValueSetter.call(input, value);
const ev2 = new Event("input", {
bubbles: true
});
input.dispatchEvent(ev2);
}
});