We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
html code
<ng-select class="NgSelect" formControlName="Status" [searchable]="true"> <ng-option *ngFor="let Status of _Statuses" [value]="Status">{{ Status.Value }}</ng-option> </ng-select>
ts code
this.Form = new FormGroup({ Status: new FormControl(null, Validators.required), }); let SetStatus = {_id: 12345, Value: 'Waiting'}; this.Form.controls['Status'].setValue(SetStatus );
set Status to the Form Controls it's working but not showing the ng-select
if i am using the another ng-select format
'<ng-select [items]="_Statuses" bindLabel="Value" class="NgSelect" formControlName="Status" [searchable]="true"> </ng-select>'
its working good
how to solve first format error?
The text was updated successfully, but these errors were encountered:
@kathiraashi create reproducible example using stackblitz
Sorry, something went wrong.
https://stackblitz.com/edit/ng-select-reactive-form
Here is modified solution, you need to use compareWith https://stackblitz.com/edit/angular-hyg8xh. #666 has detailed explanation why your model is not selected.
compareWith
No branches or pull requests
html code
ts code
set Status to the Form Controls it's working
but not showing the ng-select
if i am using the another ng-select format
its working good
how to solve first format error?
The text was updated successfully, but these errors were encountered: