Hide/Show component according the result of a API call #14361
Replies: 1 comment
-
I found my issue. I was inspired by the solution https://docs.budibase.com/docs/lookup-record |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I created a form with a input text and a search button. When the user submits the form I added 2 actions : first, I refresh the dataProvider. This dataProvider is linked to a API call that uses the value of the input text. The 2nd action I created is "Update State" . I created a key according the result of the API call. If the API call returns some results I display a container otherwise it's another.
The issue is that the 2 actions seem to be executed in parallel or the 2nd action does not wait for the response from the dataProvider. I tried using the "executeQuery" action but I got the same result.
As a result, I have to click the search button twice to display the results.
Is this the correct way to proceed? What is the best practice for displaying a container based on the result of an API call?
Beta Was this translation helpful? Give feedback.
All reactions