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

Function toggleKey

packages/react-stately/src/table/useTableState.ts:175–186  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

173 },
174 expandedKeys,
175 toggleKey(key) {
176 setExpandedKeys(keys => {
177 let newKeys = new Set(keys);
178 if (newKeys.has(key)) {
179 newKeys.delete(key);
180 } else {
181 newKeys.add(key);
182 }
183
184 return newKeys;
185 });
186 },
187 treeColumn
188 };
189}

Callers

nothing calls this directly

Calls 3

deleteMethod · 0.80
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected