Overview
CometChatBannedMembers is a Component that displays all the users who have been restricted or prohibited from participating in specific groups or conversations. When the user is banned, they are no longer able to access or engage with the content and discussions within the banned group. Group administrators or owners have the authority to ban members from specific groups they manage. They can review user activity, monitor behavior, and take appropriate actions, including banning users when necessary.
- iOS
- Android

Usage
Integration
The following code snippet illustrates how you can directly incorporate the Banned Members component into your Application.- 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 action is activated when you select the done icon while in selection mode. This returns a list of all the banned 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.
- App.tsx
2. onItemPress
TheonItemPress event is activated when you click on the Banned 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.
- App.tsx
3. onItemLongPress
TheonItemLongPress event is activated when you Long Press on the Banned 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.
- App.tsx
4. OnBack
OnBack is triggered when you click on the back button of the Banned Members component. You can override this action 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 Banned Members 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. BannedMembersRequestBuilder
The BannedMembersRequestBuilder enables you to filter and customize the Banned Members list based on available parameters in BannedMembersRequestBuilder. This feature allows you to create more specific and targeted queries when fetching banned members. The following are the parameters available in BannedMembersRequestBuilder| Methods | Type | Description |
|---|---|---|
| setLimit | number | sets the number of banned members that can be fetched in a single request, suitable for pagination |
| setSearchKeyword | String | used for fetching banned members matching the passed string |
| setScopes | Array<String> | used for fetching banned members based on multiple scopes |
- App.tsx
2. SearchRequestBuilder
The SearchRequestBuilder uses BannedMembersRequestBuilder enables you to filter and customize the search list based on available parameters in BannedMembersRequestBuilder. Example- App.tsx
Events
Events are emitted by aComponent. 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 Add Members component is as follows.
| Event | Description |
|---|---|
| ccGroupMemberUnBanned | Triggers when a user is unbanned from a group |
- Adding Listeners
- Removing Listeners
Customization
To fit your app’s design requirements, you can customize the appearance of the Groups 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. BannedMembers Style
You can set theBannedMembersStyle to the Banned Members Component to customize the styling.
- iOS
- Android

- App.tsx
| Property | Description | Code |
|---|---|---|
| border | Used to set border | border?: BorderStyleInterface, |
| borderRadius | Used to set border radius | borderRadius?: number; |
| background | Used to set background colour | background?: 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; |
| searchIconTint | Used to set search icon tint | searchIconTint?: string; |
| searchBorder | Used to set search border | searchBorder?: BorderStyleInterface; |
| searchBorderRadius | Used to set search border radius | searchBorderRadius?: number; |
| searchBackground | Used to set search background color | searchBackground?: string; |
| searchTextFont | Used to set search text font | searchTextFont?: FontStyleInterface; |
| searchTextColor | Used to set search text color | searchTextColor?: string; |
| onlineStatusColor | Used to set online status color | onlineStatusColor?: string; |
| loadingIconTint | Used to set loading icon tint | loadingIconTint?: string; |
| separatorColor | Used to set separator color | separatorColor?: string; |
| emptyTextColor | Used to set empty state text color | emptyTextColor?: string; |
| emptyStateTextFont | Used to set empty state text font | emptyStateTextFont?: FontStyleInterface; |
| errorTextFont | Used to set error state text font | errorStateTextFont?: FontStyleInterface; |
| errorTextColor | Used to set error state text color | errorStateTextColor?: string; |
| sectionHeaderTextFont | Used to set section header text font | sectionHeaderTextFont?: FontStyleInterface; |
| sectionHeaderTextColor | Used to set section header text color | sectionHeaderTextColor?: string; |
2. Avatar Style
To apply customized styles to theAvatar component in the Add Members Component, you can use the following code snippet. For further insights on Avatar Styles refer
- App.tsx
3. ListItem Style
To apply customized styles to theListItemStyle component in the Add Members Component, you can use the following code snippet. For further insights on ListItemStyle Styles refer
- App.tsx
4. StatusIndicator Style
To apply customized styles to the Status Indicator component in the Add Members Component, You can use the following code snippet. For further insights on Status Indicator 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.- App.tsx
- iOS
- Android

| Property | Description | Code |
|---|---|---|
| title | Used to set title in the app bar | title?: string; |
| searchPlaceholderText | Used to set search placeholder text | searchPlaceholderText?: string; |
| backButtonIcon | Used to set back button icon | backButtonIcon?: ImageURISource |
| showBackButton | Used to toggle visibility for back button | showBackButton?: boolean |
| searchBoxIcon | Used to set search Icon in the search field | searchBoxIcon?: ImageURISource |
| hideSearch | Used to toggle visibility for search box | hideSearch?: boolean |
| hideError | Used to hide error on fetching users | hideError?: boolean |
| hideSeparator | Used to hide the divider separating the user items | hideSeparator?: boolean |
| disableUsersPresence | Used to control visibility of user indicator shown if user is online | disableUsersPresence?: boolean |
| selectionIcon | Used to override the default selection complete icon | selectionIcon?: ImageURISource |
| emptyStateText | Used to set a custom text response when fetching the users has returned an empty list | emptyStateText?: string |
| errorStateText | Used to set a custom text response when some error occurs on fetching the list of users | errorStateText?: string |
| group | Used to pass group object of which group members will be shown | group={chatGroup} |
Advance
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 Add Members Component. Example- iOS
- Android

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

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

- App.tsx
EmptyStateView
You can set a customEmptyStateView using EmptyStateView to match the empty view of your app.
- App.tsx
AppBarOptions
You can set the Custom Menu view to add more options to the Add Members component.- iOS
- Android

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

- App.tsx