CometChatGroupMembers
is a versatile Component designed to showcase all users who are either added to or invited to a group, thereby enabling them to participate in group discussions, access shared content, and engage in collaborative activities. Group members have the capability to communicate in real-time through messaging, voice and video calls, and various other interactions. Additionally, they can interact with each other, share files, and join calls based on the permissions established by the group administrator or owner.
CometChatGroupMembers
, as a Composite Component, offers flexible integration options, allowing it to be launched directly via button clicks or any user-triggered action. Additionally, it seamlessly integrates into tab view controllers. With group members, users gain access to a wide range of parameters and methods for effortless customization of its user interface.
The following code snippet exemplifies how you can seamlessly integrate the GroupMembers component into your application.
If you’re defining the Group members within the XML code, you’ll need to extract them and set them on the Group object using the appropriate method.
OnBackPressListener
is triggered when you press the back button in the app bar. It has a predefined behavior; when clicked, it navigates to the previous activity. However, you can override this action using the following code snippet.
Component
. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders
of Chat SDK.
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 |
---|---|---|
showBackButton | Used to show or hide back button | showBackButton={true}?: boolean |
hideError | Used to hide error on fetching groups | hideError?: boolean |
hideSearch | Used to toggle visibility for search box | hideSearch?: boolean |
searchPlaceholderText | Used to set custom search placeholder text | searchPlaceholderText='Custom Search PlaceHolder' |
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 |
hideHeader | Used to toggle visibility for the toolbar/header | hideHeader?: boolean |
Group Memebers
component does not provide additional functionalities beyond this level of customization.