Skip to content

Commit

Permalink
fix(TreeView): Add more unit tests (#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvalaura committed Dec 20, 2024
1 parent b1e537e commit 433ae38
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ export function useTreeView(props: UseTreeViewProps) {
});

const selectedItems = React.useMemo(() => {
console.log(items);

return items.filter(
item => item.checkedStatus === IndeterminateCheckboxStatus.checked
);
Expand All @@ -167,7 +165,7 @@ export function useTreeView(props: UseTreeViewProps) {
}, [items, rawInitialExpandedItems]);

const itemToFocus = React.useMemo(() => {
const enabledItems = items.filter(item => !item?.isDisabled);
const enabledItems = items.filter(item => !item.isDisabled);
const [firstItem] = enabledItems;

if (selectable === TreeViewSelectable.off) {
Expand Down

0 comments on commit 433ae38

Please sign in to comment.