angular-chosen | AngularJS Chosen directive is an AngularJS Directive | Plugin library
kandi X-RAY | angular-chosen Summary
kandi X-RAY | angular-chosen Summary
Angular Chosen Localytics
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular-chosen
angular-chosen Key Features
angular-chosen Examples and Code Snippets
Community Discussions
Trending Discussions on angular-chosen
QUESTION
I am using angular-chosen, by default if the source list is empty the element is disabled. Is there a way to enable the element even if the source list is empty?
...ANSWER
Answered 2020-May-15 at 08:08After looking into the source code I can conclude that it's not possible (at least, without hacks).
You see, they are calling disableIfEmpty
function and there's no way to control it.
They are watching disabled
attribute changes, and when it changes - they update component. This was done to be compatible with ng-disabled
directive. But it still won't help you if you want to enable empty select.
Also, if you manually run $('[ng-model="myPets"]').removeAttr("disabled")
it won't really help you since they are not showing native select, but rather their own div
:
So, if you really just want to make it look enabled - you can either apply this CSS:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-chosen
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page