Vtex tab layout render

Hi everyone, I have a question: Is it possible not to render one tab from the list if it doesn’t have any content?

Thanks for answer

Hello Serhii,

I don’t believe so. That was the default behavior for the tab-layout, but after some customer feedback it was changed to not display when the content of a tab is empty:

Just in case, I’m checking with the team responsible for this component to confirm if there is a way to do this.

Eduardo Luciano
Field Software Engineer | VTEX

@eduardo.luciano
Thank you for answer.

Hello everything is fine?

If there are very specific tab blocks, you can use conditions, for example:

“condition-layout.product#tab”: {
“props”: {
“conditions”: [
{
“subject”: “isProductAvailable”
}
],
“Then”: “flex-layout.row#tab”,
“Else”: “flex-layout.row#empty”
}
},

or

“condition-layout.product#tab”: {
“props”: {
“conditions”: [
{
“subject”: “categoryTree”,
“arguments”: {
“id”: “1”
}
},
{
“subject”: “categoryTree”,
“arguments”: {
“id”: “31”
}
}

],
“matchType”:“any”,
“Then”: “flex-layout.row#tab”,
“Else”: “flex-layout.row#empty”
}
},

Check out the doc here: