MCPcopy Index your code
hub / github.com/adobe/react-spectrum / deleteNode

Function deleteNode

packages/react-stately/src/data/useTreeData.ts:268–275  ·  view source on GitHub ↗
(node: TreeNode<T>, map: Map<Key, TreeNode<T>>)

Source from the content-addressed store, hash-verified

266 }
267
268 function deleteNode(node: TreeNode<T>, map: Map<Key, TreeNode<T>>) {
269 map.delete(node.key);
270 if (node.children) {
271 for (let child of node.children) {
272 deleteNode(child, map);
273 }
274 }
275 }
276 return {
277 items,
278 selectedKeys,

Callers 1

updateTreeFunction · 0.85

Calls 1

deleteMethod · 0.80

Tested by

no test coverage detected