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.
onItemPress
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.
onItemLongPress
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.
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?: BorderStyleInterface, |
borderRadius | Used to set border radius | borderRadius?: number; |
backgroundColor | Used to set background colour | backgroundColor?: string; |
height | Used to set height | height?: string | number ; |
width | Used to set width | width?: string | number ; |
titleFont | Used to set title text font | titleFont?: FontStyleInterface, |
titleColor | Used to set title text color | titleColor?: string; |
backIconTint | Used to set back button icon tint | backIconTint?: string; |
searchBorder | Used to set search border | searchBorder?: BorderStyleInterface; |
searchBorderRadius | Used to set search border radius | searchBorderRadius?: number; |
searchTextFont | Used to set search text font | searchTextFont?: FontStyleInterface; |
searchTextColor | Used to set search text color | searchTextColor?: string; |
searchIconTint | Used to set search icon tint | searchIconTint?: string; |
onlineStatusColor | Used to set online status color | onlineStatusColor?: string; |
separatorColor | Used to set separator color | separatorColor?: string; |
loadingIconTint | Used to set loading icon tint | loadingIconTint?: string; |
emptyTextFont | Used to set empty state text font | emptyTextFont?: FontStyleInterface; |
emptyTextColor | Used to set empty state text color | emptyTextColor?: string; |
errorTextFont | Used to set error state text font | errorTextFont?: FontStyleInterface; |
errorTextColor | Used to set error state text color | errorTextColor?: string; |
GroupScope
to the Group Members Component to customize the styling.
Property | Description | Code |
---|---|---|
border | Used to set border | border?: BorderStyleInterface, |
borderRadius | Used to set border radius | borderRadius?: number; |
backgroundColor | Used to set background colour | backgroundColor?: string; |
height | Used to set height | height?: string | number ; |
width | Used to set width | width?: string | number ; |
optionTextFont | Used to set option text font | optionTextFont?: FontStyleInterface |
optionTextColor | Used to set option text color | optionTextColor?: string; |
optionBackgroundColor | Used to set option background color | optionBackgroundColor?: string; |
optionBorder | Used to set option border | optionBorder?: BorderStyleInterface; |
optionBorderRadius | Used to set option border radius | optionBorderRadius?: number; |
arrowIconTint | Used to set arrow icon tint | arrowIconTint?: string; |
selectedOptionTextFont | Used to set selected option text font | selectedOptionTextFont?: FontStyleInterface, |
selectedOptionTextColor | Used to set selected option text color | selectedOptionTextColor?: string; |
selectedOptionBackgroundColor | Used to set selected option background color | selectedOptionBackgroundColor?: string; |
selectedOptionBorder | Used to set selected option border | selectedOptionBorder?: BorderStyleInterface; |
selectedOptionBorderRadius | Used to set selected option border radius | selectedOptionBorderRadius?: number; |
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 | Used to set title in the app heading | title?: string |
errorStateText | Used to set a custom text response when some error occurs on fetching the list of group members | errorStateText?: string |
emptyStateText | Used to set a custom text response when fetching the group members has returned an empty list | emptyStateText?: string |
searchBoxIcon | Used to set search Icon in the search field | searchBoxIcon?: ImageType |
showBackButton | Used to show or hide back button | showBackButton?: boolean |
backButtonIcon | Used to set the back button Icon | backButtonIcon?: ImageType |
hideError | Used to hide error on fetching groups | hideError?: boolean |
hideSearch | Used to toggle visibility for search box | hideSearch?: boolean |
hideSeparator | Used to hide the divider separating the user items | hideSeparator?: boolean |
disableUsersPresence | Used to toggle functionality to show user’s presence | disableUsersPresence?: boolean |
selectionMode | set the number of group members that can be selected, SelectionMode can be single, multiple or none. | selectionMode?: 'none' | 'single' | 'multiple' |
group | Used to pass group object of which group members will be shown | group: CometChat.Group |
searchPlaceholder | Used to set custom search placeholder text | searchPlaceholder='Custom Search PlaceHolder' |
hideSubmitIcon | Used to hide the submit button | hideSubmitIcon?: boolean |
EmptyStateView
using emptyStateView
to match the empty view of your app.
ErrorStateView
using errorStateView
to match the error view of your app.