File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ const SortableTreeMenuNotMemoized = function SortableItemWrapper({
72
72
}
73
73
74
74
const parent = findParent ( items , active )
75
-
76
75
const props : SortableItemWrapperProps = {
77
76
setNodeRef,
78
77
setActivatorNodeRef,
@@ -87,7 +86,7 @@ const SortableTreeMenuNotMemoized = function SortableItemWrapper({
87
86
active,
88
87
style,
89
88
parent : parent ,
90
- previousItem, // over된 item의 이전 item을 의미함
89
+ previousItem, // over된 item의 이전 item을 의미함 // TODO: remove
91
90
isParentOver : getIsParentOver ( parent , over ?. id ) ,
92
91
isChildrenOver : over ? item . childrenIds . includes ( over ?. id ) : false ,
93
92
depth,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export const SortableItem = forwardRef<HTMLDivElement, SortableItemProps>((props
85
85
86
86
useEffect ( ( ) => {
87
87
if ( ! isEdit ) return
88
- // Dispached by other component
88
+ // action이 edit이 아닌 경우
89
89
if ( actionInfo === null || ! isEditAction ( actionInfo ) ) {
90
90
setIsEdit ( false )
91
91
return
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ function getProjection(
200
200
depth = minDepth
201
201
}
202
202
203
- if ( previousItem && ( previousItem . kind === 'MdxPage' || previousItem . type === 'separator' ) ) {
203
+ if ( previousItem && previousItem . type === 'separator' ) {
204
204
depth = previousItem . depth
205
205
}
206
206
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ export function normalizePageToTreeData(
11
11
parent : PageItem | Item | null = null ,
12
12
) : SortableItem [ ] {
13
13
return items . map ( ( item , index ) => {
14
- const open = route . startsWith ( removeCodeFromRoute ( item . route ) )
15
- const opened = collapsedTree . has ( item . id )
16
- const collapsed = item . kind === 'Folder' && ( open || opened )
14
+ const isFocus = route . startsWith ( removeCodeFromRoute ( item . route ) )
15
+ const isCollapsed = collapsedTree . has ( item . id )
16
+ const collapsed = item . kind === 'Folder' && ( isFocus || isCollapsed )
17
17
const data : Omit < SortableItem , 'childrenIds' > = {
18
18
...item ,
19
19
parentId,
You can’t perform that action at this time.
0 commit comments