File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/app/src/explorer Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { assertGroup } from '@h5web/shared/guards' ;
22import { buildEntityPath } from '@h5web/shared/hdf5-utils' ;
3+ import { useDeferredValue } from 'react' ;
34
45import { useEntity } from '../hooks' ;
56import EntityItem from './EntityItem' ;
@@ -15,7 +16,8 @@ interface Props {
1516function EntityList ( props : Props ) {
1617 const { level, parentPath, selectedPath, onSelect } = props ;
1718
18- const group = useEntity ( parentPath ) ;
19+ const parentPathDef = useDeferredValue ( parentPath ) ;
20+ const group = useEntity ( parentPathDef ) ;
1921 assertGroup ( group ) ;
2022
2123 if ( group . children . length === 0 ) {
@@ -30,7 +32,7 @@ function EntityList(props: Props) {
3032 return (
3133 < EntityItem
3234 key = { name }
33- path = { buildEntityPath ( parentPath , name ) }
35+ path = { buildEntityPath ( parentPathDef , name ) }
3436 entity = { entity }
3537 level = { level }
3638 selectedPath = { selectedPath }
You can’t perform that action at this time.
0 commit comments