collection closing bug fixed
This commit is contained in:
parent
b0f87e8659
commit
906779010e
|
@ -45,6 +45,7 @@ const CollectionListing = () => {
|
||||||
return buildTreeFromCollections(
|
return buildTreeFromCollections(
|
||||||
collections,
|
collections,
|
||||||
router,
|
router,
|
||||||
|
tree,
|
||||||
user.collectionOrder
|
user.collectionOrder
|
||||||
);
|
);
|
||||||
} else return undefined;
|
} else return undefined;
|
||||||
|
@ -324,6 +325,7 @@ const Dropdown = (
|
||||||
const buildTreeFromCollections = (
|
const buildTreeFromCollections = (
|
||||||
collections: CollectionIncludingMembersAndLinkCount[],
|
collections: CollectionIncludingMembersAndLinkCount[],
|
||||||
router: ReturnType<typeof useRouter>,
|
router: ReturnType<typeof useRouter>,
|
||||||
|
tree?: TreeData,
|
||||||
order?: number[]
|
order?: number[]
|
||||||
): TreeData => {
|
): TreeData => {
|
||||||
if (order) {
|
if (order) {
|
||||||
|
@ -338,7 +340,7 @@ const buildTreeFromCollections = (
|
||||||
id: collection.id,
|
id: collection.id,
|
||||||
children: [],
|
children: [],
|
||||||
hasChildren: false,
|
hasChildren: false,
|
||||||
isExpanded: false,
|
isExpanded: tree?.items[collection.id as number]?.isExpanded || false,
|
||||||
data: {
|
data: {
|
||||||
id: collection.id,
|
id: collection.id,
|
||||||
parentId: collection.parentId,
|
parentId: collection.parentId,
|
||||||
|
|
Ŝarĝante…
Reference in New Issue