Lalindu
Lalindu

Reputation: 349

Azure Devops extension (Build task) enable/disable or show/hide control based on user action

I am developing Azure Devops extension and I have requirement to enable/disable or show/hide control based on user action.

Please refer below image,

enter image description here

Requirement is once "Default Path" check box is ticked "Custom Path" input box should be disable or hide. And Once "Default Path" check box is tick is removed "Custom Path" input box should be enable or show.

Is this possible to achieve? Please be kind enough to share your thoughts on this. Thanks in advance.

Upvotes: 1

Views: 1053

Answers (1)

Bozhidar Stoyneff
Bozhidar Stoyneff

Reputation: 3634

You're looking for the visibleRule property.

You could do it like so:

{
  "name": "defPath",
  "type": "boolean",
  "label": "Default path",
},
{
  "name": "customPathInput",
  "type": "string",
  "label": "Custom path",
  "visibleRule": "defPath = false"
},

See this for details.

Upvotes: 2

Related Questions