How to hide float input for certain property values?

I’m currently working with the shader node inputs and have hit a wall.

Basically I added a few float inputs to the noise texture node, which are only supposed to show up when the Dimension property is set to either 2 or 3.

I tried just simply adding .make_available([](bNode &node) { node_storage(node).dimensions = 3; to my float input declaration in sh_node_tex_noise_declare but for some reason the float inputs still show up no matter whichever Dimension value is selected.

How do I make my float inputs only show up when the Dimension property is set to either 2 or 3?