Array actions do not work within Dynamic Events

======== TEMPLATE BUG FORM ========

Wappler Version : 3.5.7
Operating System : Windows
Server Model: Node
Database Type: N/A
Hosting Type: N/A

Expected behavior

What do you think should happen?

The array should be updated.

Actual behavior

What actually happens?

I get this error.

How to reproduce

  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue
  1. Create an Array object on the page
  2. Add a Dynamic Event to an element and use one of the Array actions to add a value into the array.

Example code:

 <a dmx-on:click="uuid.replaceAt(0,'test')" id="btn_deletecontact" dmx-bind:data-uuid="{{uuid}}">
       <em class="icon ni ni-na"></em><span>Delete Contact</span>
</a>

Not sure what exactly are you doing on your page but i just tested the two dynamic events on click:

  • Add Item / Add Unique Item
  • Replace Item At

And both work perfectly fine.

This error message look really strange - as if you are trying to use the Add Item to add the array itself as its own value, or maybe some other element/dynamic binding on the page has the same name/id as the array component?

Please check these.