Skip to content

Commit

Permalink
fix: disableHover flag on root accordion items
Browse files Browse the repository at this point in the history
  • Loading branch information
zovomat committed May 11, 2022
1 parent 1eb46cf commit dff2ee0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/store/folder/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
FolderView
} from '../../../types';
import { useFolderStore } from './store';
import { filterNodes, folderViewFilter, mapNodes, sortFolders } from './utils';
import { filterNodes, folderViewFilter, isRoot, mapNodes, sortFolders } from './utils';

// FOLDERS
export const useFolder = (id: string): Folder | undefined => useFolderStore((s) => s.folders?.[id]);
Expand Down Expand Up @@ -70,7 +70,8 @@ export const useFoldersAccordionByView = (
label: f.name,
CustomComponent,
items: [],
folder: f
folder: f,
disableHover: isRoot(f)
}),
filterFunction: folderViewFilter(view),
recursionKey: 'items',
Expand Down

0 comments on commit dff2ee0

Please sign in to comment.