Page 1 of 1

Hide a single child tab

Posted: 2022-03-23 14:47
by balfons
Hi everyone!

I have a question about hiding children tabs. I have a parent table ITERATIONS with a child table COMPONENTS.

Now I'm trying to show/hide the following elements according to the value of a field name SIMPLE.

If SIMPLE is YES, then:
- show the field COMMENT of the table ITERATIONS
- show the field ATTACH of the table ITERATIONS
- hide the child tab COMPONENTS

If SIMPLE is NO, then:
- hide the field COMMENT of the table ITERATIONS
- hide the field ATTACH of the table ITERATIONS
- show the child tab COMPONENTS

And what happened? I can hide/show fields but I cannot hide the child tab, it is always displayed. My question is, if I only have one child tab, it cannot be hidden?

I have done the same for another parent/child tables and it worked, but in this second case there were more than 1 child table.

Thanks in advance.

Re: Hide a single child tab

Posted: 2022-03-23 17:40
by jsetzer
Question: are you waiting for AppGiniHelper.dv.ready before modifying children-tabs?

Honestly speaking, I have never tried to hide the last remaining tab and there is a chance that this will be denied by code. Because in these cases it does not make sense to have a tab-container at all. But I understand your business case.

You can also use javascript/jQuery and completely hide the whole tabs container as a workaround.

Re: Hide a single child tab

Posted: 2022-03-24 11:03
by balfons
Hi Jan!

thanks for your answer. In the end I decided to add another children table instead of the field ATTACH, so now I have COMPONENTS and ELEMENTS as childs of ITERATIONS, so:

If SIMPLE is YES, then:
- show the field COMMENT of the table ITERATIONS
- show the child tab ELEMENTS
- activate the child tab ELEMENTS (since is not the default active tab)
- hide the child tab COMPONENTS

If SIMPLE is NO, then:
- hide the field COMMENT of the table ITERATIONS
- hide the child tab ELEMENTS
- show the child tab COMPONENTS (no need to activate because it is the default active table)

Thanks!