feat(select): add support for bootstrap-select #85

Merged
merged 1 commit into from Apr 11, 2013

Conversation

Projects
None yet
3 participants
Contributor

dancras commented Mar 31, 2013

No description provided.

zapnap commented Apr 11, 2013

+1 :)

@mgcrea mgcrea added a commit that referenced this pull request Apr 11, 2013

@mgcrea mgcrea Merge pull request #85 from dancras/feature/bootstrap-select
feat(select): add support for bootstrap-select
07b0124

@mgcrea mgcrea merged commit 07b0124 into mgcrea:master Apr 11, 2013

1 check passed

default The Travis build passed
Details
Owner

mgcrea commented Apr 11, 2013

Awesome, thanks. I'll update the docs.

Owner

mgcrea commented Apr 11, 2013

I've refactored the tests so that it goes along the other directives.
Also I've dropped the syncClass functionality, I don't quite understand why it may be need.
Please provide a plunker/additional information on the use-case.

Contributor

dancras commented Apr 29, 2013

The refactor has removed two important use cases:

  • When the select options list changes (eg. when using ng-options directive) the bootstrap select field is not updated. This is why watching the length of the select element was necessary rather than using timeout.
  • When using ng-model with validation, the bootstrap select element is no longer updated with classes as the validation state changes. This was the use case for the sync classes. Another use case is when using the ng-class directive on the original select element.

Also:

  • The directive does not declare that it is using scope, but uses it. Read this for an explanation why this is not a good idea.
  • There is an unused NG_OPTIONS_REGEXP variable.

Apologies for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment