(select: HTMLSelectElement | null, values: string[])
| 4 | } |
| 5 | |
| 6 | export function setSelectValues(select: HTMLSelectElement | null, values: string[]): void { |
| 7 | if (!select) return; |
| 8 | const selected = new Set(values); |
| 9 | Array.from(select.options).forEach((option) => { |
| 10 | option.selected = selected.has(option.value); |
| 11 | }); |
| 12 | } |
| 13 | |
| 14 | export function clearSelectValues(select: HTMLSelectElement | null): void { |
| 15 | if (!select) return; |
no outgoing calls
no test coverage detected