CometChatGroupMembers
is a Component that displays all users added or invited to a group, granting them access to group discussions, shared content, and collaborative features. Group members can communicate in real-time via messaging, voice and video calls, and other activities. They can interact, share files, and join calls based on group permissions set by the administrator or owner.
onSelect
action is activated when you select the done icon while in selection mode. This returns a list of all the group members that you have selected.
This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
onItemClick
event is activated when you click on the Group Members List item. This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
OnBack
is triggered when you click on the back button of the Group Members component. You can override this action using the following code snippet.
onClose
is triggered when you click on the close button of the Group Members component. You can override this action using the following code snippet.
Methods | Type | Description |
---|---|---|
setLimit | number | sets the number of group members that can be fetched in a single request, suitable for pagination |
setSearchKeyword | String | used for fetching group members matching the passed string |
setScopes | Array<String> | used for fetching group members based on multiple scopes |
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
Events emitted by the Group Members component is as follows.
Event | Description |
---|---|
ccGroupMemberBanned | Triggers when the group member banned from the group successfully |
ccGroupMemberKicked | Triggers when the group member kicked from the group successfully |
ccGroupMemberScopeChanged | Triggers when the group member scope is changed in the group |
GroupMembersStyle
to the Group Members Component to customize the styling.
Property | Description | Code |
---|---|---|
border | Used to set border | border?: string, |
borderRadius | Used to set border radius | borderRadius?: string; |
background | Used to set background colour | background?: string; |
height | Used to set height | height?: string; |
width | Used to set width | width?: string; |
titleTextFont | Used to set title text font | titleTextFont?: string, |
titleTextColor | Used to set title text color | titleTextColor?: string; |
searchPlaceholderTextFont | Used to set search placeholder font | searchPlaceholderTextFont?: string; |
searchPlaceholderTextColor | Used to set search placeholder color | searchPlaceholderTextColor?: string; |
searchTextFont | Used to set search text font | searchTextFont?: string; |
searchTextColor | Used to set search text color | searchTextColor?: string; |
emptyStateTextFont | Used to set empty state text font | emptyStateTextFont?: string; |
emptyStateTextColor | Used to set empty state text color | emptyStateTextColor?: string; |
errorStateTextFont | Used to set error state text font | errorStateTextFont?: string; |
errorStateTextColor | Used to set error state text color | errorStateTextColor?: string; |
loadingIconTint | Used to set loading icon tint | loadingIconTint?: string; |
searchIconTint | Used to set search icon tint | searchIconTint?: string; |
searchBorder | Used to set search border | searchBorder?: string; |
searchBorderRadius | Used to set search border radius | searchBorderRadius?: string; |
searchBackground | Used to set search background color | searchBackground?: string; |
onlineStatusColor | Used to set online status color | onlineStatusColor?: string; |
separatorColor | Used to set separator color | separatorColor?: string; |
boxShadow | Used to set box shadow | boxShadow?: string; |
backButtonIconTint | Used to set back button icon tint | backButtonIconTint?: string; |
closeButtonIconTint | Used to set close button icon tint | closeButtonIconTint?: string; |
privateGroupIconBackground | Used to set private group icon bg | privateGroupIconBackground?: string; |
passwordGroupIconBackground | Used to set password group icon bg | passwordGroupIconBackground?: string; |
padding | Used to set padding | padding?: string; |
GroupScope
to the Group Members Component to customize the styling.
Property | Description | Code |
---|---|---|
border | Used to set border | border?: string, |
borderRadius | Used to set border radius | borderRadius?: string; |
background | Used to set background colour | background?: string; |
height | Used to set height | height?: string; |
width | Used to set width | width?: string; |
titleTextFont | Used to set title text font | titleTextFont?: string, |
titleTextColor | Used to set title text color | titleTextColor?: string; |
activeTextFont | Used to set active text font | activeTextFont?: string; |
activeTextColor | Used to set active text color | activeTextColor?: string; |
activeTextBackground | Used to set active text background | activeTextBackground?: string; |
arrowIconTint | Used to set arrow icon tint | arrowIconTint?: string; |
textFont | Used to set text font | textFont?: string; |
textColor | Used to set text color | textColor?: string; |
optionBackground | Used to set option background color | optionBackground?: string; |
optionBorder | Used to set option border | optionBorder?: string; |
optionBorderRadius | Used to set option border radius | optionBorderRadius?: string; |
hoverTextFont | Used to set hover text font | hoverTextFont?: string; |
hoverTextColor | Used to set hover text color | hoverTextColor?: string; |
hoverTextBackground | Used to set hover text background | hoverTextBackground?: string; |
buttonTextFont | Used to set button text font | buttonTextFont?: string; |
buttonTextColor | Used to set button text color | buttonTextColor?: string; |
buttonBackground | Used to set button background color | buttonBackground?: string; |
closeIconTint | Used to set close icon tint | closeIconTint?: string; |
Avatar
component in the Group Members Component, you can use the following code snippet. For further insights on Avatar
Styles refer
ListItemStyle
component in the Group Members
Component, you can use the following code snippet. For further insights on ListItemStyle
Styles refer
Property | Description | Code |
---|---|---|
title report | Used to set title in the app heading | title="Your Custom Title" |
errorStateText report | Used to set a custom text response when some error occurs on fetching the list of group members | errorStateText="your custom error state text" |
emptyStateText report | Used to set a custom text response when fetching the group members has returned an empty list | emptyStateText="your custom empty state text" |
searchIconURL | Used to set search Icon in the search field | searchIconURL="Your Custom search icon" |
loadingIconURL | Used to set loading Icon | loadingIconURL="your custom loading icon url" |
closeButtonIconURL | Used to set close button Icon | closeButtonIconURL="your custom close icon url" |
dropDownIconURL | Used to set the dropdown Icon | dropDownIconURL='Your Custom Dropdown Icon' |
backButtonIconURL | Used to set the back button Icon | backButtonIconURL='Your Custom back Icon' |
hideError | Used to hide error on fetching groups | hideError={true} |
hideSearch | Used to toggle visibility for search box | hideSearch={true}" |
hideSeparator | Used to hide the divider separating the user items | hideSeparator={true} |
disableLoadingState report | disable the loading state | disableLoadingState={true} |
disableUsersPresence | Used to toggle functionality to show user’s presence | disableUsersPresence={true} |
showBackButton | Hides / shows the back button as per the boolean value | showBackButton={true} |
selectionMode | set the number of group members that can be selected, SelectionMode can be single, multiple or none. | selectionMode={SelectionMode.multiple} |
titleAlignment | Alignment of the heading text for the component | titleAlignment={TitleAlignment.center} |
userPresencePlacement report | determines the position where the user presence indicator is displayed relative to the user’s avatar or name, with right or bottom indicating it’s displayed to the right or bottom of the user’s list. | userPresencePlacement={UserPresencePlacement.right} |
group report | Used to pass group object of which group members will be shown | group={chatGroup} |
searchKeyword report | Used to set the search keyword | searchKeyword='alice' |
searchPlaceholder report | Used to set custom search placeholder text | searchPlaceholder='Custom Search PlaceHolder' |
EmptyStateView
using emptyStateView
to match the empty view of your app.
ErrorStateView
using errorStateView
to match the error view of your app.