- iOS
- Android

Usage
Integration
The following code snippet illustrates how you can directly incorporate the Groups component into yourApp.tsx file.
- App.tsx
Actions
Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.1. onSelection
TheonSelection event is activated when you select the done icon in the AppBar while in selection mode. This returns a list of all the Groups 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.
- App.tsx
- iOS
- Android

2. onItemPress
TheonItemPress event is activated when you press on the Group 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.
- App.tsx
3. onItemLongPress
TheonItemLongPress event is activated when you Long Press on the Group 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.
- App.tsx
4. onBack
TheonBack function is built to respond when you press the back button in the AppBar. The back button is only displayed when the prop showBackButton is set to true.
By default, this action does not have a predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
- App.tsx
5. onError
This action doesn’t change the behavior of the component but rather listens for any errors that occur in the Groups component.- App.tsx
Filters
Filters allow you to customize the data displayed in a list within a 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.1. GroupsRequestBuilder
The GroupsRequestBuilder enables you to filter and customize the group list based on available parameters in GroupsRequestBuilder. This feature allows you to create more specific and targeted queries when fetching groups. The following are the parameters available in GroupsRequestBuilder
Example
In the example below, we are applying a filter to the Group List based on only joined groups and setting the limit to ten.
- App.tsx
2. SearchRequestBuilder
The SearchRequestBuilder uses GroupsRequestBuilder enables you to filter and customize the search list based on available parameters in GroupsRequestBuilder. Example- App.tsx
Events
Events are emitted by a 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. To handle events supported by Groups you have to add corresponding listeners by usingCometChatGroupEvents.
The Groups component does not produce any events directly.
Customization
To fit your app’s design requirements, you can customize the appearance of the conversation component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.Style
Using Style you can customize the look and feel of the component in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the component.1. Groups Style
You can set theGroupsStyle to the Groups Component to customize the styling.
- iOS
- Android

- App.tsx
2. Avatar Style
To apply customized styles to theAvatar component in the Groups Component, you can use the following code snippet. For further insights on Avatar Styles refer
- App.tsx
3. StatusIndicator Style
To apply customized styles to the Status Indicator component in the Groups Component, You can use the following code snippet. For further insights on Status Indicator Styles refer- App.tsx
3. LisItem Style
To apply customized styles to the List Item component in the Groups Component, you can use the following code snippet. For further insights on List Item Styles refer- App.tsx
Functionality
These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.- iOS
- Android

- App.tsx
Advanced
For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.ListItemView
With this property, you can assign a custom ListItem to the Groups Component.- App.tsx
- iOS
- Android

SubtitleView
You can customize the subtitle view for each group item to meet your requirements- App.tsx
- iOS
- Android

LoadingStateView
You can set a custom loader view usingLoadingStateView to match the loading view of your app.
- App.tsx
- iOS
- Android

EmptyStateView
You can set a customEmptyStateView using EmptyStateView prop to match the empty view of your app.
- App.tsx
- iOS
- Android

AppBarOptions
You can set Custom AppBarOptions to add more options to the Groups component.- App.tsx
- iOS
- Android

Swipe Options
You can set Custom Swipe options to the Groups component.- App.tsx
- iOS
- Android










