How to hide any widget based on the filter value 'All'

I need to hide a widget when the the no values are selected and default token value is All. How can i achieve it?
image

In the example here we are setting a view parameter to the ‘All’ token.

So for your example you’d only need to detect that same thing:

var viewParameter = this.parentView.control.getViewParameterByName("viewParameter1");

if (viewParameter.parameterValue.token && viewParameter.parameterValue.token.id ==  dundas.constants.ALL_TOKEN_DEFINITION_ID) {
    // hide something here
}

You could put this in the parameter value changed action if you wanted to detect when a user selects the ‘All’ token.

To hide a control there is a hidden property on all adapters you can set to true to hide them. Alternatively you can put the controls on a layer and hide / show it with something similar to this example here.