-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
@Just1nWang
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When I integrated the application into the react project using lowcoder-sdk, the fetch called in run javascript had no effect.
Expected Behavior
When I integrated the application into the react project using lowcoder-sdk, the fetch called in run javascript can work.
Steps to reproduce
- Add a FormButton
- Listen Click Event
- Write Javascript as Follow
async function fetch_ip() {
console.log("1. fetch start")
try {
const res = await fetch("https://api.ipify.org?format=json")
console.log("2. fetch end")
if (!res.ok) {
console.log("3. fetch error")
} else {
console.log("4. fetch ok")
const result = await res.json()
return result
}
} catch (error) {
console.log("5. fetch exception", error)
}
}
fetch_ip().then(res => {
console.log("6. fetch result", res)
})
- Embed App in React using lowcoder-sdk
- click FormButton in React app
- check Chrome DevTools Network, no any request send.
Environment
"lowcoder": 2.4.2
"lowcoder-sdk": "^2.4.8"
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels