MCPcopy
hub / github.com/github/awesome-copilot / setChoicesValues

Function setChoicesValues

website/src/scripts/choices.ts:18–23  ·  view source on GitHub ↗
(choices: Choices, values: string[])

Source from the content-addressed store, hash-verified

16 * Restore selected values on a Choices instance.
17 */
18export function setChoicesValues(choices: Choices, values: string[]): void {
19 // Clear any existing active items so that the final selection matches `values`
20 choices.removeActiveItems();
21 // Set all provided values as the current selection
22 choices.setChoiceByValue(values);
23}
24
25/**
26 * Create a new Choices instance with sensible defaults

Callers 1

initExtensionsPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected