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

Function onToggle

packages/react-stately/src/tree/useTreeState.ts:86–88  ·  view source on GitHub ↗
(key: Key)

Source from the content-addressed store, hash-verified

84 }, [tree, selectionState.focusedKey]);
85
86 let onToggle = (key: Key) => {
87 setExpandedKeys(toggleKey(expandedKeys, key));
88 };
89
90 return {
91 collection: tree,

Callers 1

PromptFieldVoiceButtonFunction · 0.50

Calls 1

toggleKeyFunction · 0.70

Tested by

no test coverage detected