You can also do this with property bindings. It's a little weird how it works so I made a demonstration video. Basically, you turn the tab into an object and add properties to it to enable the various other properties. Full list of properties can be found on the help page.

Note that this is not the same as hiding the tab but you could do conditional styling on the tab also. I just wanted to include this in case it's helpful for someone searching the forums down the road.