[Table] Add feature to control how many avatars should be shown in `STableCellAvatars`
kiaking opened this issue · 0 comments
kiaking commented
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
.