@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
10 lines • 344 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);
}
};