Skip to content

[avatar-group] Overflow is not removed after removing size constraint #9756

@sissbruecker

Description

@sissbruecker

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:

// 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

  1. Add max-width: 80px to an avatar group, so that only the first avatar and the overflow avatar are shown
  2. Remove the size constraint
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions