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

Function updateSelected

packages/react-stately/src/toggle/useToggleState.ts:73–77  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

71 let [initialValue] = useState(isSelected);
72
73 function updateSelected(value) {
74 if (!isReadOnly) {
75 setSelected(value);
76 }
77 }
78
79 function toggleState() {
80 if (!isReadOnly) {

Callers

nothing calls this directly

Calls 1

setSelectedFunction · 0.70

Tested by

no test coverage detected