Replace 'multiple' property with 'isShowCheckbox' in NbOptionComponent to control it outside
- Dominant language
- TypeScript
- Stars
- 8.1k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue type
**I'm submitting a ...** (check one with "x")
* [ ] bug report
* [x] feature request
### Issue description
**Current behavior:**
NbOptionComponent has _multiple_ property, which determines whether option should be with checkbox (multiple select).
After adding new _autocomplete component_ (https://github.com/akveo/nebular/pull/1947) _parent_ property may not be set, because NbOptionComponent can be used in NbAutocompleteComponent, which doesn't have _multiple_ property. So now we have check on _multiple_ property getter.
**Expected behavior:**
Control of multiple select mode outside component via _isShowCheckbox_.
**Related code:**
```
get multiple() {
// We check parent existing because parent can be NbSelectComponent or
// NbAutocomplete and `miltiple` property exists only in NbSelectComponent
return this.parent ? (>this.parent).multiple : false;
}
```
**Angular, Nebular**
```
Angular: 8.0.0
Nebular 4.2.1
```
Contributor guide
Assessment
This issue has not been assessed yet.