Skip to content

Commit 6ab43b4

Browse files
fixed query variable value when used with event handler control
1 parent 6ef3c5e commit 6ab43b4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

client/packages/lowcoder/src/comps/queries/queryCompUtils.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ export function toQueryView(params: FunctionProperty[]) {
3434
Object.keys(props.variables)
3535
.filter(k => k !== "$queryName")
3636
.forEach(key => {
37+
const value = Object.hasOwn(props.variables[key], 'value') ? props.variables[key].value : props.variables[key];
3738
mappedVariables.push({
3839
key: `${key}.value`,
39-
value: props.variables[key] || ""
40+
value: value || ""
4041
})
4142
mappedVariables.push({
4243
key: `${props.args?.$queryName}.variables.${key}`,
43-
value: props.variables[key] || ""
44+
value: value || ""
4445
})
4546
})
4647

client/packages/lowcoder/vite.config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import dynamicImport from 'vite-plugin-dynamic-import';
1212
import { ensureLastSlash } from "./src/dev-utils/util";
1313
import { buildVars } from "./src/dev-utils/buildVars";
1414
import { globalDepPlugin } from "./src/dev-utils/globalDepPlguin";
15-
import { terser } from 'rollup-plugin-terser';
15+
import { terser } from 'rollup-plugin-terser';
1616
// import { nodePolyfills } from 'vite-plugin-node-polyfills'
1717

1818
dotenv.config();
@@ -87,6 +87,7 @@ export const viteConfig: UserConfig = {
8787
manualChunks: (id) => {
8888
if (id.includes("node_modules")) {
8989
// UI LIBRARIES
90+
// if (id.includes("node_modules/@ant-design/v5-patch-for-react-19")) return "ant-design-v5-patch";
9091
if (id.includes("@ant-design/icons")) return "ant-design-icons";
9192
if (id.includes("node_modules/antd")) return "antd";
9293
if (id.includes("styled-components")) return "styled-components";

0 commit comments

Comments
 (0)