I'm submitting a ... (check one with "x")
Current behavior:
I had form thats' loads data from an API, binding an object to NbSelect (selcted) not working for object value
Expected behavior:
something similar to compareWith Input specified on the https://angular.io/api/forms/SelectControlValueAccessor
Steps to reproduce:
Related code:
myComponent.html
<nb-select formControlName="user" [selected]="form.value.user [compareWith]="compareById">
<nb-option *ngFor="let usert of users" [value]="user">
{{ user.fullName }}
</nb-option>
</nb-select>
myComponent.ts
users = [{id: 1, fullName: 'Foo"}, {id: 2, fullName: 'Bar'}]
compareById(user1: User, user2: User) {
return user1 && user2 && user1.id === user2.id;
}
npm, node, OS, Browser
node: v10.15.3
npm: 6.4.1
OS: macOS (Mojave)
Browser: Opera Chromium
-->
Angular, Nebular
Angular: 8.0.0
Nebular: 4.1.2
Some update about it?
Any update?
I need this.
Please see this tread:
Most helpful comment
I need this.