I added array component to the page. And I added the ids of the lines I want to delete with the checkbox. These ids appeared in the array successfully. But what I want to do is to empty the array after the deletion. However, I saw that the empty array feature is not working properly. The “empty array” property does not work at all.
I would appreciate if you have any suggestions for a temporary solution until this problem is fixed.
Tested this on the same configuration and seems to work fine.
Empty is correctly emptying the array.
Could it be that your arr2 component is nested inside some other component… which is why its not accessible directly?
Try using dmx.parse/dmx.app.data in console to verify.
@Teodor,
Now I recreated the same example in a blank page;
I tested it in two ways
I created a list of cities and added a checkbox at the beginning of each line. When the checkbox is checked, it adds it to the array. When unchecked, it should delete it from array. But when it is checked, it adds the data belonging to that row infinitely. and Array empty feature does not work.
Likewise, I added a checkbox in the city list and asked it to add to the array when it was checked. This time I added it as “arr2.addUniq (Cityname)”. He worked successfully at Array. But the empty array still didn’t work.
PS: If I add data to the Array with an input field and empty it with the array empty function, everything works perfectly. I think this problem occurs when the problem is used in Array. If you want, I can share the sample test page with you or I can create a similar sample for you.
(Sorry that I created an incorrect test in the previous post and reported the result.)