Components | Description |
---|---|
CometChatList | A reusable container component having title, search box, customisable background and a list view. |
CometChatListItem | A component that renders data obtained from a Group object on a Tile having a title, subtitle, leading and trailing view. |
onSelect
action is activated when you select the done icon while in selection mode. This returns the group
object along with the boolean flag selected
to indicate if the group was selected or unselected.
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 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 groups that can be fetched in a single request, suitable for pagination |
setSearchKeyword | String | used for fetching groups matching the passed string |
joinedOnly | boolean | to fetch only joined groups. |
setTags | Array<String> | used for fetching groups containing the passed tags |
withTags | boolean | used to fetch tags data along with the list of groups |
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 using CometChatGroupEvents
The Groups
component does not produce any events directly.
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 Group Type | Hides the group type icon. | hideGroupType={true} |
Active Group | The group to highlight in the list. | activeGroup={chatGroup} |
Selection Mode | Selection mode to use for the default trailing view. | selectionMode={SelectionMode.multiple} |
Show Scrollbar | Controls the visibility of the scrollbar in the list. | showScrollbar={true} |
Loading View | A custom view to display during the loading state. | loadingView={<>Custom Loading View</>} |
Empty View | Custom view for the empty state of the component. | emptyView={<>Custom Empty View</>} |
Error View | A custom view to display when an error occurs. | errorView={<>Custom Error View</>} |