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] option doesn't work

See original GitHub issue

I have tried adding the option [disabled]=“true” to an ng-select as shown here:

https://ng-select.github.io/ng-select#/multiselect

However I receive the following runtime error in the browser console:

Can't bind to 'disabled' since it isn't a known property of 'ng-select'.

I would like to use the option on a single select if possible, but I have tested on both a single and multi select and it doesn’t work in either case. Other options work as expected.

More Info

ng-select version: 0.35.1

browser: Chrome, IE11

reproducible in demo page: NO

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
arkonbobcommented, Apr 9, 2018

@varnastadeus Yes, adding [(ngModel)] to the ng-select fixed it. Many thanks!

0reactions
jagomfcommented, Oct 30, 2019

Probably it means that ng-select cannot be disabled unless it is inside and bound to a form.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my select option not getting disabled? - Stack Overflow
I tried to simulate the filling of the select and honestly everything seems to work correctly at the onchange . It could depend...
Read more >
HTML option disabled Attribute - W3Schools
The disabled attribute is a boolean attribute. When present, it specifies that an option should be disabled. A disabled option is unusable and...
Read more >
HTMLSelectElement.disabled - Web APIs | MDN
The HTMLSelectElement.disabled is a boolean value that reflects the disabled HTML attribute, which indicates whether the control is disabled ...
Read more >
Disabling an item in a select doesn't work
Hello. I try to dynamically change the disabled value of some items of a select component following the value of another component.
Read more >
Enable or disable macros in Microsoft 365 files
You don't have to enable macros to see or edit the file; only if you want the ... In Excel this option is...
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