Functionality not working when inside a conditional region

I am sure there is something I am doing wrong, but was wondering if I can have some help. I have wrapped some content around a conditional region, however for some reason some functionality like sorting, executing a search and or navigating the pagination buttons do not work when the elements are inside the conditional region.
This is a screenshot of the elements that appear on the page, but can’t execute the actions only when inside the region.

Here is a screen shot of the code I am using.

Any help will be much appreciated.

If it were me to be honest I would rather use dynamic show/hide surrounding those elements instead of a condition.

As far as I know a condition adds all the data to the browser DOM, then removes it, checks the result of the condition and then leaves it off or re adds it again.

Therefore every now and again, conditions can make things a bit more difficult.

My general rule of thumb is that I will only use client side conditions if the data inside the condition is sensitive, i.e. a user dashboard where different users have different permissions, and I do not want a normal user to be able to unhide a delete button in their inspector, so i will have it in a condition rather, and that way they do not even know its there.

Just me opinion on it though.

hi @psweb, yes, you are correct, I generally use the dynamic show/hide. However, the particular data that I want have inside the conditional region is sensitive. In the past we have used 2 different pages with different access levels, however because the information in the page is almost identical, this is leaving use with lots extra work trying to up keep 2 or sometimes more pages.

1 Like

@George wondering if there is anything you can recommend I could do to fix this issue. Thanks in advance for your help.
J

Using show/hide instead of the conditional region would probably fix it. For security it doesn’t matter, the conditional region has some performance benefits since it doesn’t do any dom updates and components within the region are not run.

I will check the issue. I suppose the table was build using the table generator and you used our paging component for the paging. The data used to fill the table, is this from a serverconnect outside of the conditional region or was it retrieved inside the region?

@patrick, thanks for looking into this. yes, you are correct all functionality is using wappler components.
Please let me know if you need any info from me.
Best regards
J

@patrick, I am wondering if you have any updates on this?
Thanks
Juan

With the conditional component it removes/destroys the component within when the condition doesn’t match. This also means that they will loose any internal state they have, so an input that had some value typed in will loose that value. That is one thing I know of and can’t fix this behavior. That the component doesn’t work at all, I’m still researching this.

1 Like