* Retrieves a flat structure of all MultiComboBox items from the slotted nodes. * * @private
()
| 1602 | * @private |
| 1603 | */ |
| 1604 | _getItems(): Array<IMultiComboBoxItem> { |
| 1605 | const items: IMultiComboBoxItem[] = []; |
| 1606 | const slottedItems = this.getSlottedNodes<IMultiComboBoxItem>("items"); |
| 1607 | |
| 1608 | slottedItems.forEach(item => { |
| 1609 | if (isInstanceOfMultiComboBoxItemGroup(item)) { |
| 1610 | const groupItems = [item, ...item.items].filter(Boolean); |
| 1611 | items.push(...groupItems); |
| 1612 | } else { |
| 1613 | items.push(item); |
| 1614 | } |
| 1615 | }); |
| 1616 | |
| 1617 | return items; |
| 1618 | } |
| 1619 | |
| 1620 | _getSelectedItems(): Array<MultiComboBoxItem> { |
| 1621 | // Angular 2 way data binding |
no test coverage detected