Skip to content

Commit

Permalink
IBX-1848: Fixed count number of hidden items in dropdowns (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Jan 20, 2022
1 parent 1961dfd commit 18af816
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bundle/Resources/public/js/scripts/core/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,13 @@
index !== 0 &&
itemsWidth > this.selectedItemsContainer.offsetWidth - RESTRICTED_AREA_ITEMS_CONTAINER
) {
numberOfOverflowItems++;
const isPlaceholder = item.classList.contains('ibexa-dropdown__selected-placeholder');

item.hidden = true;

if (!isPlaceholder) {
numberOfOverflowItems++;
}
}
});

Expand Down

0 comments on commit 18af816

Please sign in to comment.