@@ -29,7 +29,7 @@ const TreeView = ({
29
29
stories,
30
30
story,
31
31
updateStory,
32
- searchActive ,
32
+ allExpanded ,
33
33
searchRef,
34
34
setTreeRootRef,
35
35
hotkeys,
@@ -39,15 +39,15 @@ const TreeView = ({
39
39
searchRef : React . Ref < HTMLInputElement > ;
40
40
updateStory : UpdateStory ;
41
41
setTreeRootRef : ( root : HTMLUListElement | null ) => void ;
42
- searchActive ?: boolean ;
42
+ allExpanded ?: boolean ;
43
43
hotkeys : boolean ;
44
44
} ) => {
45
45
const treeItemRefs : TreeItemRefs = React . useRef ( { } ) ;
46
46
const [ tree , setTree ] = React . useState (
47
- getStoryTree ( stories , story , searchActive ) ,
47
+ getStoryTree ( stories , story , allExpanded ) ,
48
48
) ;
49
49
React . useEffect ( ( ) => {
50
- setTree ( getStoryTree ( stories , story , searchActive ) ) ;
50
+ setTree ( getStoryTree ( stories , story , allExpanded ) ) ;
51
51
} , [ stories . join ( "," ) ] ) ;
52
52
53
53
const [ selectedItemId , setSelectedItemId ] = React . useState < string | null > (
@@ -64,7 +64,7 @@ const TreeView = ({
64
64
const hotkeyStoryTransition = ( story ?: string ) => {
65
65
if ( story ) {
66
66
updateStory ( story ) ;
67
- setTree ( getStoryTree ( stories , story , searchActive ) ) ;
67
+ setTree ( getStoryTree ( stories , story , allExpanded ) ) ;
68
68
setTimeout ( ( ) => focusSelectedItem ( story ) , 1 ) ;
69
69
}
70
70
} ;
0 commit comments