Wait while queries being executed #11277
-
Hello, Any ideas ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
hey @NicolasFabre81 you can do this using App State and Conditional UI. Here's a quick demo: First I have set up my button actions so that before my query runs, I create a state variable This means that we can now conditionally render components based on that The most simple example of this is that I can hide my button while it is loading by doing this: I can then render something else in the button's place using the same conditions. I added an embed component with HTML for a Spectrum CSS spinner since all of the classes are already available in Budibase. Here's the snippet I used: <div class="spectrum-ProgressCircle spectrum-ProgressCircle--indeterminate">
<div class="spectrum-ProgressCircle-track"></div>
<div class="spectrum-ProgressCircle-fills">
<div class="spectrum-ProgressCircle-fillMask1">
<div class="spectrum-ProgressCircle-fillSubMask1">
<div class="spectrum-ProgressCircle-fill"></div>
</div>
</div>
<div class="spectrum-ProgressCircle-fillMask2">
<div class="spectrum-ProgressCircle-fillSubMask2">
<div class="spectrum-ProgressCircle-fill"></div>
</div>
</div>
</div>
</div> Now when I set that to conditionally show only when This is a fairly basic example but you can do a lot more using the same principles. If you don't want to hide the button another idea would be to conditionally disable the button when |
Beta Was this translation helpful? Give feedback.
hey @NicolasFabre81
you can do this using App State and Conditional UI. Here's a quick demo:
First I have set up my button actions so that before my query runs, I create a state variable
loading
and set it totrue
. Then my query runs and once it is finished I then have another step to delete theloading
state.This means that we can now conditionally render components based on that
loading
value which will only betrue
when the query is running.The most simple example of this is that I can hide my button while it is loading by doing this:
I can then render something else in the button's place using the same conditions. I added an embed component with HTML for a Spectrum CSS spinner sin…