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.

Usage
Integration
The following code snippet illustrates how you can directly incorporate the Banned Members component into your Application.- app.module.ts
- app.component.ts
- app.component.html
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. onSelect
TheonSelect 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.component.ts
- app.component.html
2. 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.component.ts
- app.component.html
3. onClose
onClose is triggered when you click on the close button of the Banned Members component. You can override this action using the following code snippet.
- app.component.ts
- app.component.html
4. 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.component.ts
- app.component.html
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
Example
In the example below, we are applying a filter to the banned members by setting the limit to 2 and setting the scope to show only the moderator.
- app.component.ts
- app.component.html
2. SearchRequestBuilder
The SearchRequestBuilder uses BannedMembersRequestBuilder enables you to filter and customize the search list based on available parameters in BannedMembersRequestBuilder. This feature allows you to keep uniformity between the displayed Banned Members list and searched Banned Members. Example- app.component.ts
- app.component.html
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.
The Banned Members component does not produce any events.
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.

- app.component.ts
- app.component.html
2. Avatar Style
To apply customized styles to theAvatar component in the Banned Members Component, you can use the following code snippet. For further insights on Avatar Styles refer
- app.component.ts
- app.component.html
3. LisItem Style
To apply customized styles to theList Item component in the Banned Members Component, you can use the following code snippet. For further insights on List Item Styles refer
- app.component.ts
- app.component.html
4. StatusIndicator Style
To apply customized styles to the Status Indicator component in the Banned Members Component, You can use the following code snippet. For further insights on Status Indicator Styles refer- app.component.ts
- app.component.html
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.component.ts
- app.component.html


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 Banned Members Component. Example Default:

- app.component.ts
- app.component.html
SubtitleView
You can customize the subtitle view for each banned members to meet your requirements Default:

- app.component.ts
- app.component.html
LoadingStateView
You can set a custom loader view usingloadingStateView to match the loading view of your app.
Default:


- app.component.ts
- app.component.html
EmptyStateView
You can set a customEmptyStateView using emptyStateView to match the empty view of your app.
Default:


- app.component.ts
- app.component.html
ErrorStateView
You can set a customErrorStateView using errorStateView to match the error view of your app.
Default:


- app.component.ts
- app.component.html
Menus
You can set the Custom Menu view to add more options to the Banned Members component.
- app.component.ts
- app.component.html
Options
You can set the Custom options to the Banned Members component.
- app.component.ts
- app.component.html