Merge pull request #4523 from primefaces/issue-4522

Fixed #4522 - Add extra check for separator item
pull/4534/head
Tuğçe Küçükoğlu 2023-10-02 09:19:18 +03:00 committed by GitHub
commit f7f17cc4a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ export default {
return !!processedItem && (processedItem.level === 0 || this.isItemActive(processedItem)) && this.isItemVisible(processedItem); return !!processedItem && (processedItem.level === 0 || this.isItemActive(processedItem)) && this.isItemVisible(processedItem);
}, },
isValidItem(processedItem) { isValidItem(processedItem) {
return !!processedItem && !this.isItemDisabled(processedItem); return !!processedItem && !this.isItemDisabled(processedItem) && !this.getItemProp(processedItem, 'separator');
}, },
findFirstItem() { findFirstItem() {
return this.visibleItems.find((processedItem) => this.isValidItem(processedItem)); return this.visibleItems.find((processedItem) => this.isValidItem(processedItem));