mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
RelationInputDataManager: Fix position of newly connected relations
This commit is contained in:
parent
9151dac427
commit
2f37a716a2
@ -32,7 +32,7 @@ export const normalizeRelations = (
|
||||
pages:
|
||||
[
|
||||
...(relations?.data?.pages ?? []),
|
||||
...(modifiedData?.connect ? [{ results: modifiedData?.connect }] : []),
|
||||
...(modifiedData?.connect ? [{ results: modifiedData.connect }] : []),
|
||||
]
|
||||
?.map((page) =>
|
||||
page?.results
|
||||
@ -52,8 +52,7 @@ export const normalizeRelations = (
|
||||
)
|
||||
.filter(Boolean)
|
||||
)
|
||||
?.filter((page) => page.length > 0)
|
||||
?.reverse() ?? [],
|
||||
?.filter((page) => page.length > 0) ?? [],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user