Spinner shown on all buttons

Hi,

So I have a table with on each row there is a button which have a spinner, this spinner is shown during executing of an server connect.

The issue i’m having is that the spinner is shown on all buttons and not only on the one selected.:
image

Does any one know how to make that the spinner is only shown on the selected button?

Regards,

Nick

Hello @pheaxx
Are these buttons in a repeat region? Do they run the same server action, or do they run separate ones?

Hi Teodor,

they are in the repeat region of a table and they execute the same server connect action, but with different value send to the action.

Ah but now you mention it, it clicked, I don’t see this being possible because all the button look at the state of the same action, so they all get triggered when you press one.

is this in anyway possible, or do i need to move the spinner outside the button and repeat?

You can do this using a variable.
Create your variable, for example var1. On button click - add two dynamic events: run the server action and variable set value. Set the record id as a value for the variable.

Then for the spinner you will have a condition like:
dmx-show="serverconnect1.state.executing && recordid == var1.value"

2 Likes

Awesome! simple solution, thank you @Teodor

1 Like