Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function updateInput(node, value) {
if (node.multiple) {
Array.from(node.children).forEach(v => {
if (value.includes(v.value)) {
v.selected = !v.selected;
}
});
fireEvent.change(node);
return;
}
node.value = value;
fireEvent.input(node);
}