From 280387d4a152a51dedd0854e6fc1a7487ed657da Mon Sep 17 00:00:00 2001 From: Imiss-U1025 Date: Thu, 6 Feb 2025 15:02:36 -0500 Subject: [PATCH] check variable name list for uniqueness of name --- client/packages/lowcoder/src/comps/editorState.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/packages/lowcoder/src/comps/editorState.tsx b/client/packages/lowcoder/src/comps/editorState.tsx index 81b462201..6b40d61de 100644 --- a/client/packages/lowcoder/src/comps/editorState.tsx +++ b/client/packages/lowcoder/src/comps/editorState.tsx @@ -493,6 +493,15 @@ export class EditorState { if (name !== oldName && this.nameAndExposingInfo().hasOwnProperty(name)) { return trans("comp.nameExists", { name: name }); } + + //Check query variable name duplication + const queryComInfoList:string[] = [].concat(...(this.getQueriesComp() + .toJsonValue().map((item: any) => item.variables.variables.map((v: any) => v.key)))); + + if (name !== oldName && queryComInfoList.includes(name)) { + return trans("comp.nameExists", { name: name }); + } + return ""; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy