-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds functionality to make ng2-select compatible with form-controls #881
Adds functionality to make ng2-select compatible with form-controls #881
Conversation
Codecov Report
@@ Coverage Diff @@
## development #881 +/- ##
===============================================
- Coverage 37.33% 30.37% -6.96%
===============================================
Files 11 11
Lines 450 451 +1
Branches 73 76 +3
===============================================
- Hits 168 137 -31
- Misses 282 313 +31
- Partials 0 1 +1
Continue to review full report at Codecov.
|
@valorkin Any chance to get this merged? |
@sonukapoor good work. Any chance you can merge this @valorkin ??? |
thanks for contributing! I am addressing this PR to ngx team, we will try to publish it soon |
Will do.
…On Wed, Oct 25, 2017 at 8:01 AM Dmitriy Shekhovtsov < ***@***.***> wrote:
thanks for contributing!
please remove package-lock
I am addressing this PR to ngx team, we will try to publish it soon
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#881 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADpVrw8RhRGNfVs7UZLD2dOtNeI_N-kks5svyMTgaJpZM4POtb3>
.
|
@valorkin done. I also reverted the other files. Please also note that my vs code formatted the file with proper spaces etc. and when reviewing you should ignore the white spaces: https://github.com/valor-software/ng2-select/pull/881/files?w=1 |
when this PR will be merged ? |
I have a separate fork with the compiled version of the ng2-select using this PR that is available for anybody that wants to use it: |
I'm updating dependencies right now so we'll be able to test it soon, then it will be merged. |
Please review attached PR. It allows you to use the ng2-select component with ngModel.
Simple usage:
Add the following attributes:
name
is the name of your control.[(ngModel)]
should be set to your selected items. It's should be the same as[active]
.`<form #form="ngForm">
`<ng-select required
name="mySelect"
#mySelect="ngModel"
[(ngModel)]="selectedItems"
[active]="selectedItems"
[items]="newItems">
Is Form Valid: {{ form.valid }}
Is Control Valid: {{ mySelect.valid }}
Note: I have tested this only with template forms.
Feedback is appreciated.