akveo / akveo/nebular

NbSelect issue when using it with a template variable

Đang mở
#3,184 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
8.1k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.