Skip to content

Commit f25f3e6

Browse files
committed
fix: handle isActive status
1 parent 9809a47 commit f25f3e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/markdown-editor/src/components/sidebar/sortable-tree/sortable-item.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const SortableItem = forwardRef<HTMLDivElement, SortableItemProps>((props
3333

3434
const router = useRouter()
3535
const routeOriginal = useFSRoute()
36-
const [route] = routeOriginal.split('#')
36+
const [originRoute] = routeOriginal.split('#')
37+
const route = decodeURIComponent(originRoute)
3738

3839
const {
3940
wrapperRef,
@@ -50,8 +51,10 @@ export const SortableItem = forwardRef<HTMLDivElement, SortableItemProps>((props
5051
} = props
5152

5253
const isAction = ['newPage', 'newFolder', 'newSeparator'].includes(item.type) || isEdit
54+
5355
const active =
5456
!isDragging && !isAction && !isGhost && [route, `${route}/`].includes(item.route + '/')
57+
5558
// const isLink = 'withIndexPage' in item && item.withIndexPage
5659

5760
const isShowMenu = showMenuId === item.id

0 commit comments

Comments
 (0)