-
Notifications
You must be signed in to change notification settings - Fork 586
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
Adding formControl as a component argument #758
Adding formControl as a component argument #758
Conversation
… to warnings about possible changed after checked' errors
…I was 'missing' ReactiveFormsModule detailed here: angular/angular-cli#3975
@@ -110,7 +110,7 @@ | |||
"typescript": "2.1.5", | |||
"wallaby-webpack": "0.0.30", | |||
"webdriver-manager": "11.1.1", | |||
"zone.js": "0.7.5" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## development #758 +/- ##
==============================================
- Coverage 37.33% 31.93% -5.4%
==============================================
Files 11 11
Lines 450 454 +4
Branches 73 71 -2
==============================================
- Hits 168 145 -23
- Misses 282 309 +27
Continue to review full report at Codecov.
|
@@ -259,6 +259,7 @@ export class SelectComponent implements OnInit, ControlValueAccessor { | |||
@Input() public textField:string = 'text'; | |||
@Input() public childrenField:string = 'children'; | |||
@Input() public multiple:boolean = false; | |||
@Input() public formControl = new FormControl(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Here's the form control objects for the various examples Single when Berlin is selected:
Multiple when Amsterdam and Antwerp are selected and we use Validators.required:
Couldn't test Children because it seems like even the unmodified version isn't working. Even on your site. I don't see options when I type or click the dropdown. |
@valorkin Let's merge this ! 😄 |
Can somebody pleeeaase merge this issue? We are actually waiting for it! 😄 |
@JordyVlassembrouck so @amitdahan mentioned you can use formControl like normal. See the conversation above. I'm going to test if that works for me but I'm currently swamped at work. Also this repo is dead apparently however our company might maintain a fork in the future. |
…uded migration section in readme
Disabling AOT due to $$__genDir error and adding
Upgraded to Angular 4
Fixed multiple enter issue
@psilospore I continued to developing the package in the fork: https://github.com/optimistex/ngx-select-ex Yes, I saw your fork: https://github.com/psilospore/ng-next-select |
I was trying to figure out how to use a formControl with this library and couldn't figure out how to then I saw this issue #556
So I allowed a user to pass in a FormControl in.
e.g. for SingleDemoComponent it would be
Now singleControl should be accessible. You can get the value, if it's pristine, dirty, etc.
This is my first open source PR so sorry if something's wrong.