Ability to programmatically set the hidden field of any component

Every component has setValue() method. A setHidden() attribute will help dynamically alter the UI, show notifications, banner and a lot of use cases.

Hi @goku! We actually plan to launch setHidden as soon as this week. Stay tuned!

1 Like

longest week ever? :smile: just kidding, but is this still planned?

1 Like

Hi @G1ofG3 setHidden has launched :slightly_smiling_face: It should be available for many components:

In doing some testing, it looks like there may be some exceptions, such as the table. In this case, my recommendation would be to use a container around the table, which can be used with setHidden.

Which component are you looking to set to hidden?

I see, I've tried this yesterday at the alert component, there its not available for example. And the question was if its possible to add this to all components.

So is there a list where its available and where its not ?

Hi there!

I looked into this internally. It looks like we added .setHidden for all of our newer components, but some of the components that have not been recently updated still don't have .setHidden. This at least includes: JSON Editor, JSON Explorer, Button Group, Alert, Cascader, Checkbox Tree, and Rich Text Editor. You can check the components page under Methods to confirm whether a component is compatible, or you can see if the method comes up in auto-complete in the JS query editor. We have a feature request on file to go back and add it to all components. I'll post here when that request is completed.

In the meantime, here's another workaround if you don't want to use containers!

1 Like