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

Function onToggle

packages/react-stately/src/table/useTreeGridState.ts:94–96  ·  view source on GitHub ↗
(key: Key)

Source from the content-addressed store, hash-verified

92 }, [nodes, showSelectionCheckboxes, showDragButtons, expandedKeys]);
93
94 let onToggle = (key: Key) => {
95 setExpandedKeys(toggleKey(expandedKeys, key, treeGridCollection));
96 };
97
98 let collection = useMemo(() => {
99 return new TableCollection(treeGridCollection.tableNodes, null, context);

Callers

nothing calls this directly

Calls 1

toggleKeyFunction · 0.70

Tested by

no test coverage detected