Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function setElementToggleValueEffect(
match.checked = event.checked;
}
if (event.tagName === "SELECT") {
match.value = event.value;
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(match), 'value').set;
nativeInputValueSetter.call(match, event.value);
match.dispatchEvent(new Event('change', { bubbles: true }));
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export function setElementValueEffect(
const elems = document.getElementsByTagName(event.tagName);
const match = elems[event.index];
if (match) {
(match as HTMLInputElement).value = event.value;
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(match), 'value').set;
nativeInputValueSetter.call(match, event.value);
match.dispatchEvent(new Event('change', { bubbles: true }));
}
})
);
Expand Down