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.
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 |
Property | Description | Code |
---|---|---|
Hide Search | Hides the default search bar. | hideSearch={true} |
Hide Error | Hides the default and custom error view passed in errorView prop. | hideError={true} |
Hide Kick Member Option | Hides the option to kick a member from the group. | hideKickMemberOption={true} |
Hide Ban Member Option | Hides the option to ban a member from the group. | hideBanMemberOption={true} |
Hide Scope Change Option | Hides the option to change the scope of a group member. | hideScopeChangeOption={true} |
Hide User Status | Hides the user’s online/offline status indicator. | hideUserStatus={true} |
Show Scrollbar | Controls the visibility of the scrollbar in the list. | showScrollbar={true} |
Group | The group for which members are being fetched. | group={chatGroup} |
Search Keyword | The keyword used to filter the group members list. | searchKeyword="admin" |
Selection Mode | Selection mode to use for the default list item view. | selectionMode={SelectionMode.multiple} |
Loading View | A custom view to display during the loading state. | loadingView={<LoadingSpinner />} |
Error View | Custom view for the error state of the component. | errorView={<ErrorComponent />} |
Empty View | A custom view to display when no group members are available in the list. |