mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(editor): SchemaView renders duplicate structures properly (#12943)
This commit is contained in:
committed by
GitHub
parent
6258f0c9dd
commit
0d8a544975
@@ -282,6 +282,8 @@ export const useFlattenSchema = () => {
|
||||
path: schema.path,
|
||||
});
|
||||
|
||||
const id = `${node.name}-${expression}`;
|
||||
|
||||
if (Array.isArray(schema.value)) {
|
||||
const items: RenderItem[] = [];
|
||||
|
||||
@@ -293,14 +295,14 @@ export const useFlattenSchema = () => {
|
||||
depth,
|
||||
level,
|
||||
icon: getIconBySchemaType(schema.type),
|
||||
id: expression,
|
||||
id,
|
||||
collapsable: true,
|
||||
nodeType: node.type,
|
||||
type: 'item',
|
||||
});
|
||||
}
|
||||
|
||||
if (closedNodes.value.has(expression)) {
|
||||
if (closedNodes.value.has(id)) {
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -327,7 +329,7 @@ export const useFlattenSchema = () => {
|
||||
level,
|
||||
depth,
|
||||
value: shorten(schema.value, 600, 0),
|
||||
id: expression,
|
||||
id,
|
||||
icon: getIconBySchemaType(schema.type),
|
||||
collapsable: false,
|
||||
nodeType: node.type,
|
||||
|
||||
Reference in New Issue
Block a user