If in tabs is bugged
Question
Application Type
Reactive

https://jcfd.outsystemscloud.com/TabsTest/Screen1?_ts=637499587893204623

You can check the bug here. Tab 2 is showing when you click the button, but if you try to check its content, nothing happens, the button is just a toggle for a bool.What is going on here?


mvp_badge
MVP
Solution

Hi,

To make this working do the following:

1. Remove the IFs

2. Add to the Extended Class of both TabsHeaderItem and TabsContentItem the following condition:

If(BooleanLocalVariable, "", "hidden")

See attached

Regards,

Daniel


PlaygroundReactive.oap

mvp_badge
MVP

Nice solution. Daniel.

So, basically, if the TAB is not there from the beginning, the listener that detects the click on the tab is not listening to the previously non existing tab...?

Cheers

mvp_badge
MVP

Exactly, if you inspect the code in OutSystems UI in the OnReady event of the Tabs widget (the parent of the headers and TabsHeaderItem and TabsContentItem widgets) it loops over the tabs and creates the onclick event handler one by one.

(not the best performant way to do it imho)


Solution

Hi,

You can try this:

Kind regards, David.

mvp_badge
MVP

Hi, can I ask if both IF widgets are set to the same IF condition? For example, if you are using a boolean variable, are you using the same in both IFs (Head and Content)?

I assume yes, but I would check this to see if there is nothing different here (branches, variable...)

Cheers.

mvp_badge
MVP

Forget the last comment. I can see in the HTML the content is been placed... It seems something related to the fact the new tab is visible but does not have anything "bound" to it, in terms of a listener...

so this is a platform issue, right? no real way around it :/

Solution

Hi,

You can try this:

Kind regards, David.

mvp_badge
MVP
Solution

Hi,

To make this working do the following:

1. Remove the IFs

2. Add to the Extended Class of both TabsHeaderItem and TabsContentItem the following condition:

If(BooleanLocalVariable, "", "hidden")

See attached

Regards,

Daniel


PlaygroundReactive.oap

mvp_badge
MVP

Nice solution. Daniel.

So, basically, if the TAB is not there from the beginning, the listener that detects the click on the tab is not listening to the previously non existing tab...?

Cheers

mvp_badge
MVP

Exactly, if you inspect the code in OutSystems UI in the OnReady event of the Tabs widget (the parent of the headers and TabsHeaderItem and TabsContentItem widgets) it loops over the tabs and creates the onclick event handler one by one.

(not the best performant way to do it imho)


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.