Note. Within the repeat (and not child to any conditional element) you can refer to the SC that is within that repeat directly. (not somesection.repeat2.serverconnect.load() )
Thanks @bpj - unfortunately this is what I've tried and it doesn't fire, or even push an error to console.
I'm fine working with the SC within the repeat - I'm trying to activate all 15 at once with a button click that doesn't exist within the repeat itself.
That's what I'm currently working with, the problem is, the way the system is setup is that I have to do an external API call to our ElasticSearch instance after I have used that - so the whole page of results jumps/refreshes. When using a single SC within a repeat, the data refreshes and not the entire list.
So, I have a working solution (as per your suggestion) - just trying to improve UX a bit and also reduce resource load!
It's a bit strange I can't even fire the SC. I've tried different paths incase the path being generated by Wappler is incorrect which does sometimes happen, e.g.
I’m now able to get the SC firing, thank you @JonL - it was indeed as suspected an incorrect path.
The issue I am having now (although very happy to be a step closer) is that the path now accounts for the SC being in the repeat array, and so looks like this:
There should be a regular ID and a dynamic ID.
On click of the item inside repeat, you need to specify the regular ID for .load().
So what happens here is browser with the dynamic id does not give any warnings of ID being same… But dmx internally knows when regular ID is given, it will find the nearest item with that ID.
Just to revert back slightly to what you’re trying to solve, is it the reload ‘flicker’ in a table as items update? Have you tried adding the unique key property to the table repeat?
When I use the SC in a singular fashion from a button within the repeat, I use and have to use the external_id as this matches against an external api’s unique id. This works fine singularly.
The syntax you see, actually works fine (now) but only on the first item in the repeat due to the item[0] - I’m looking but I’m not sure how to work around that?
Ok, thank you JonL, I'll keep digging. I just really get stuck on the array, I can get the first SC working, from the button click - but I can't get it to action any of the remaining 14 due to the .item[0].
I'll keep looking - thank you for your help thus far - you absolutely helped me get further!