How do I update List content based on async JS Query

I have a list whose Items are based on the result of an async JS function, JS.loadData.data, which is run on page load. This works fine but I also have a toggle button with an event handler which runs the loadData-function again (but with other settings). However, the data in the List doesn’t update.

How do I update the List content after page load?

Hello! This is a known bug that you can track here: [Bug]-[5196]:JSObject Async function response data is not set when the function is executed using widget event like button onClick · Issue #15056 · appsmithorg/appsmith · GitHub
As a workaround, you can store the result using the storeValue() method, then use this value from Appsmith store in your List widget.

1 Like