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

Function onChange

packages/@react-spectrum/s2/src/SegmentedControl.tsx:175–182  ·  view source on GitHub ↗
(values: Set<Key>)

Source from the content-addressed store, hash-verified

173 let domRef = useDOMRef(ref);
174
175 let onChange = (values: Set<Key>) => {
176 if (onSelectionChange) {
177 let firstKey = values.values().next().value;
178 if (firstKey != null) {
179 onSelectionChange(firstKey);
180 }
181 }
182 };
183
184 return (
185 <ToggleButtonGroup

Callers

nothing calls this directly

Calls 2

nextMethod · 0.80
onSelectionChangeFunction · 0.50

Tested by

no test coverage detected