Skip to content

Commit

Permalink
Remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jul 31, 2024
1 parent 261711f commit 65d0456
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const updateSelectedAndExpanded = (node: TreeNode) => {
setDisplayedRow(node.data);
expandedKeys.value = {
...expandedKeys.value,
[node.key as string]: true,
[node.key]: true,
};
};
Expand All @@ -76,10 +76,10 @@ const expandAll = () => {
const expandNode = (node: TreeNode, newExpandedKeys: TreeExpandedKeys) => {
if (node.children && node.children.length) {
newExpandedKeys[node.key as string] = true;
newExpandedKeys[node.key] = true;
for (const child of node.children) {
expandNode(child as TreeNode, newExpandedKeys);
expandNode(child, newExpandedKeys);
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ const collapseAll = () => {
const expandNode = (node: TreeNode) => {
if (node.children && node.children.length) {
expandedKeys.value[node.key as string] = true;
expandedKeys.value[node.key] = true;
for (const child of node.children) {
expandNode(child as TreeNode);
expandNode(child);
}
}
};
Expand Down

0 comments on commit 65d0456

Please sign in to comment.