I’ve got a button inside a repeater element that will not reset. I’ve cleared the data, rerun the query then reset the data. However, I’m pretty sure the .hide() and .show() functions have some latency or remain in their respective states despite running a forEachItem on the data.
The main reason I think there is an issue with the repeater “reset” is because the code functions perfectly when the page is refreshed.
I’m going to contact Customer Care as well to report as a bug but I thought I would check to see if anyone else has experienced this.
@mike91901 OnItemReady may be the more appropriate function to place the hide and show functions in, rather than ForEachItem. That will execute every time the data gets re-assigned to the repeater. That is my best guess from what you wrote.
It would help if you would post your code, so someone can let you know whether or not there is a problem with it.
I tried posting the code on another thread and was told it’s too complicated. I’ve tested and retested the code and if/else statement logic. I know it’s not the code.
Other parts of the code execute as expected. I’m 99% sure it has something to do with the .hide() and .show() functions. They are directly related to the html side of the page and are running asynchronously to the rest of the code. I can run a .style on the button and a .hide() on the very next line. The .style will work, the .hide() doesn’t. Riddle me that Batman! ;). The data in the repeater is fine but the html elements (buttons) do not reset.
Again, the code executes perfectly on page refresh but not when setting repeater data to = [] and then repopulating it.
If wix customer service can’t help, I’ll have to redesign my UI and user workflow.
onItemReady solved all my issues THANKS !!