Hide a single child tab

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Hide a single child tab

Post by balfons » 2022-03-23 14:47

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.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Hide a single child tab

Post by jsetzer » 2022-03-23 17:40

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.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Hide a single child tab

Post by balfons » 2022-03-24 11:03

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!

Post Reply