We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0cd9490 + 917880e commit c14741bCopy full SHA for c14741b
client/packages/lowcoder/src/comps/queries/queryComp.tsx
@@ -777,13 +777,15 @@ class QueryListComp extends QueryListTmpComp implements BottomResListComp {
777
778
const jsonData = originQuery.toJsonValue();
779
//Regenerate variable header
780
+ const newKeys:string[] = [];
781
jsonData.variables?.variables?.forEach(kv => {
782
const [prefix, _] = (kv.key as string).split(/(?=\d+$)/);
783
let i=1, newName = "";
784
do {
785
newName = prefix + (i++);
- } while(editorState.checkRename("", newName));
786
+ } while(editorState.checkRename("", newName) || newKeys.includes(newName));
787
kv.key = newName;
788
+ newKeys.push(newName);
789
})
790
791
const newQueryName = this.genNewName(editorState);
0 commit comments