Skip to content

[Feature Request] Clarify VAvatarGroup limit prop to consistently limit rendered avatars #22702

@levibeeck

Description

@levibeeck

Problem to solve

The current limit prop on VAvatarGroup (labs) limits datasets processed before creating an overflow avatar, but doesn’t limit total rendered avatars. With 3 datasets and limit="2", it renders 3 avatars (2 individual + “+1”), which confuses users expecting exactly 2 visible avatars max. This mismatch between prop name/intent and behavior leads to unexpected layouts. Also the third rendered avatar that contains "+1" seems wasteful, as that avatar could've been used to just render the third dataset, if there is already space for 3 rendered avatars.

Proposed solution

Consider making the limit behavior more predictable by either:

  1. Always applying it as a strict cap on total rendered avatars (so  limit="2"  with 3 datasets shows 1 avatar + “+2” overflow), or
  2. Adding a configurable prop (e.g.  strictLimit  boolean) to toggle between current dataset-limiting logic and strict rendered-avatar limiting.
This would align better with user expectations while maintaining flexibility.

Happy to discuss or contribute a PR!

Metadata

Metadata

Labels

C: VAvatarGroupT: bugFunctionality that does not work as intended/expected

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions