-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Description
When removing a size constraint to let an avatar group grow, it's overflow is not removed. Thus avatar items that could be shown directly are still shown in the overflow overlay.
This is a permanent issue after the group has shrunk to only show a single avatar plus the overflow avatar, and is caused by this condition in the measurement logic:
web-components/packages/avatar-group/src/vaadin-avatar-group-mixin.js
Lines 500 to 503 in f8fd25e
// Always show at least two avatars | |
if (!items || !avatars || avatars.length < 3) { | |
return; | |
} |
This should probably check the number of items instead of the number of rendered avatars.
Expected outcome
When an avatar group has enough space to show additional items, those items should be shown instead of being hidden in the overflow overlay.
Minimal reproducible example
Can be reproduced with the avatar group dev page.
Steps to reproduce
- Add
max-width: 80px
to an avatar group, so that only the first avatar and the overflow avatar are shown - Remove the size constraint
- Observe that the group still only shows the first avatar and the overflow avatar
Environment
Vaadin version(s): v24, v25
Browsers
Issue is not browser related