NbSelect issue when using it with a template variable
- Dominant language
- TypeScript
- Stars
- 8.1k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue type
**I'm submitting a:
* [x] bug report
* [ ] feature request
### Issue description
**Current behavior:**
When using the select component together with a template variable is causes and infinite loop on change detection if we try to access the `selected` value
**Expected behavior:**
The component should work as expected and return undefined or null if no value is selected
**Steps to reproduce:**
```
First
Second
First Value Selected
```
**Related code:**
After looking at the source code I found out that select component tries do access selectionModel array while it is still undefined due to data loading.
As a workarround we can do something like:
`
First Value Selected
`### Other information:
**npm, node, OS, Browser**
```
Node: v18.16.0
npm: 9.5.1
```
**Angular, Nebular**
```
nebular: 11.0.0
angular: 15.2.8
```
Contributor guide
Assessment
This issue has not been assessed yet.