question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disabled attribute

See original GitHub issue

Hi, awesome work you have done here, I would like to ask how to set the dropdown as disabled, same as <select> inputs have the attribute disabled to not let the user interact with the input, I would like to do the same with the vscomp, I have tried adding the attribute/class to various divs and/or to the hidden input but it seems to have no effect and I can’t find a way around it.

If there is a way, could you please show how it is done? And if not, could you please add the feature/option in the next release? I think it would be pretty helpful to set the vscomp as disabled just like all other inputs.

Thank you!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sa-si-devcommented, Dec 18, 2021

@smagret this feature is available in the release v1.0.15

/** disable element */
document.querySelector('#sample-select').setAttribute('disabled', '');

/** enable element */
document.querySelector('#sample-select').removeAttribute('disabled');

[UPDATE] - v1.0.21

Use the below methods to disable/enable dropdown

document.querySelector('#sample-select').disable();

document.querySelector('#sample-select').enable();
1reaction
sa-si-devcommented, Aug 10, 2021

@smagret thank you for the suggestion.

I will implement it in the future release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML attribute: disabled - HTML: HyperText Markup Language
The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form.
Read more >
HTML disabled Attribute - W3Schools
The disabled attribute is a boolean attribute. When present, it specifies that the element should be disabled. A disabled element is unusable. The...
Read more >
HTML | disabled Attribute - GeeksforGeeks
The disabled attribute in HTML indicates whether the element is disabled or not. If this attribute is set, the element is disabled.
Read more >
HTML disabled Attribute - Dofactory
The disabled attribute specifies that the element is disabled. The element appears grayed out and no user interaction is possible. Disabled elements are ......
Read more >
HTML5 Forms: Disabled Type Attribute - Wufoo
The disabled attribute makes the <input> , <textarea> , and <fieldset> descendants non-editable and excludes the disabled form control data from being sent ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found