Setting the state of a Tab

Hello.

Here is my question. I work with Bubble Mobile.

I have a button on a screen. In the workflow associated to this button I have a set state because i would like to change the state of the tab bar. However, the tab bar doesn’t appear in the list of elements when configuring the set state.

Has anybody a solution ?

Thanks in advance

Regards

Hello,

Refresh your page, sometime the builder needs this.

I did that…

Is something of this type working for you ?

Try put your custom state on the page (or a parent group) using the “Set state of an element” action, then use that state in a conditional on the tab bar (e.g., toggle visibility). If you want to change the active tab, navigate to the view for that tab instead of trying to flip the tab control directly.

Thanks for your answer, Rafa. However, i have to screens and an tab bar. If i tap a button in the tab, i know how to change the icon color. But how to change the color of a tab element if i come from the first screen with a button of that page ? Considering the workflow of this button, I can’t see how to make a set state on the tab bar (the tab bar doesn’t appear in the list of elements that can be targeted). So when i’m on the second screen, i have no possibility to know about the current screen. Thanks in advance if you can think about something to help.

Jy

In order to change the color of a tab item you use conditionals “This tabitem is selected”
On top of that if you want to change based on the click of that button, one possible way is to create a field on the user datatype, for example, and change that field.

For example, is_buttom_clicked (yes/no) and on buttom click workflow change that field and on the conditional of the tabitem use that field to change what you need.

If you want multiple conditionals you can set an Option Set and link that new field to the option set.
Create conditionals on the tabitem based on that field.