MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onSelectionChange

Function onSelectionChange

packages/dev/s2-docs/src/ExampleSwitcher.tsx:83–89  ·  view source on GitHub ↗
(key: Key)

Source from the content-addressed store, hash-verified

81 }, [theme]);
82
83 let onSelectionChange = (key: Key) => {
84 if (type) {
85 setSelected(String(key));
86 } else {
87 setValue(String(key));
88 }
89 };
90
91 let onThemeChange = (key: Key | null) => {
92 setTheme(String(key));

Callers

nothing calls this directly

Calls 2

setSelectedFunction · 0.50
setValueFunction · 0.50

Tested by

no test coverage detected