nb-select does not correctly compare [(selected)] for number values
- Dominant language
- TypeScript
- Stars
- 25.7k
- Forks
- 7.9k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue type
**I'm submitting a ...** (check one with "x")
* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
Binding a field using the [(selected)] property of nb-select will not work for the default value on load for number types.
After selecting another option, the select reflects correctly.
**Expected behavior:**
[(selected)] should work on load for number values
**Steps to reproduce:**
1. Create a field that stores number
2. Bind it to nb-select with options with number values
3. Observe that the first number does not automatically get selected
**Related code:**
HTML
```html
this should be selected
```
Typescript
```typescript
numberStore = 0;
```
### Other information:
**npm, node, OS, Browser**
```
Node: v10.16.0
NPM: 6.10.2
Windows
Chrome
```
**Angular, Nebular**
```
"@angular/animations": "^8.0.0",
"@angular/cdk": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@nebular/auth": "4.1.2",
"@nebular/eva-icons": "4.1.2",
"@nebular/security": "4.1.2",
"@nebular/theme": "4.1.2",
```
Contributor guide
Assessment
This issue has not been assessed yet.