Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table] Add feature to control how many avatars should be shown in STableCellAvatars #416

Closed
kiaking opened this issue Dec 19, 2023 · 0 comments · Fixed by #417
Closed
Assignees
Labels
enhancement New feature or request

Comments

@kiaking
Copy link
Member

kiaking commented Dec 19, 2023

Currently, TableCellAvatars are fixed limit only 3 avatars to be shown. There use case where we want show more users like 10 of them.

Let's add option to specify how many avatars should be shown.

export interface TableCellAvatars<V = any, R = any> extends TableCellBase {
  type: 'avatars'
  avatars: TableCellAvatarsOption[] | ((value: V, record: R) => TableCellAvatarsOption[])
  color?: 'neutral' | 'soft' | 'mute'

  // @default 2
  avatarCount?: number
  nameCount?: number
}

When count is set to 2. It should show 2 avatars, and when there is more than 2 avatars, show placeholder avatar as 3rd avatar (this is new change). Same goes for higher numbers.

For names, when it is set to 2, show 2 names, and then suffix with +1.

@kiaking kiaking added the enhancement New feature or request label Dec 19, 2023
@kiaking kiaking self-assigned this Dec 19, 2023
kiaking added a commit that referenced this issue Dec 19, 2023
)

close #416 

---------

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant