File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
client/packages/lowcoder/src/comps/comps/customComp Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const defaultCode = `
4545 <Space>
4646 <Button
4747 type="primary"
48- onClick={() => runQuery(model.query)}
48+ onClick={() => runQuery({ queryName: model.query } )}
4949 >
5050 ${ trans ( "customComp.triggerQuery" ) }
5151 </Button>
@@ -104,10 +104,11 @@ function InnerCustomComponent(props: IProps) {
104104
105105 const methodsRef = useRef ( {
106106 runQuery : async ( data : any ) => {
107- const { queryName } = data ;
107+
108+ const { queryName, params } = data . queryName ;
108109 return getPromiseAfterDispatch (
109110 dispatch ,
110- routeByNameAction ( queryName , executeQueryAction ( { } ) )
111+ routeByNameAction ( queryName , executeQueryAction ( { args : params } ) )
111112 ) . catch ( ( error ) => Promise . resolve ( { } ) ) ;
112113 } ,
113114
You can’t perform that action at this time.
0 commit comments