Irratic Updating of Array Value When Server Connect Loads

Wappler 3.0.0 rc2

I have an array defined as follows:

<dmx-array id="event_payment_methods" dmx-bind:items="event.data.activity_details.activity_payment_methods!=&quot;&quot; ? event.data.activity_details.activity_payment_methods.split(&quot;,&quot;):[]">

Which I am expecting to have its value updated each time the server connect event is executed.

However the update of the array value is very irratic… sometimes it updates and sometimes it doesn’t when the server connect executes.

My design has about 10 of these situations, used to bring in the value of a simple multi-select input.

Is Wappler’s functionality defined such that the array should consistently update each time the server connect executes?

So I was thinking I could explicitly update the array on-success of the server connect… but I’m not sure of the syntax to do that.

What is the best way to proceed? :slight_smile:

Best regards,
Antony.

@patrick, do you have any thoughts about this…?

It should always update when the server connect updates, will do some testing to see if I can reproduce the problem.

Is there a reason why you use array component? Why not use a simple value component to store the array in, unless you want to manipulate the array.

With the value component you could call the setValue method in the success, the array component doesn’t have a method to set the whole array.

Thanks Patrick!
I need the array as it is a drop-down which can have multiple values, so I have a user interface allowing values to be added or removed.
I can point you to a live site where you can see the bug in action if required!

A link to where I can reproduce the problem would be fine. You could send it to me in a private message.

Thanks Patrick…

I’d love to send you that link, but I’ve come across a problem as I try to upload the design to my AWS server in the way I usually do… if you have a solution to the issue I just posted below then I can send you the link! :slight_smile:

Best wishes,
Antony.