CometChatTransferOwnership
is a Component that allows the current owner or administrator of a group to transfer the ownership rights and administrative control of that group to another user. By transferring ownership, the original owner can designate a new user as the group owner, giving them full control and administrative privileges over the group.
Here are some key points regarding the transfer ownership feature in CometChat:
Components | Description |
---|---|
cometchat-button | This component represents a button with optional icon and text. |
cometchat-label | This component provides descriptive information about the associated UI element. |
cometchat-radio-button | This component allows the user to exactly select one item from a set |
onTransferOwnership
action is activated when you select a group member and click on the transfer ownership submit button. you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
onClose
is triggered when you click on the close button of the Transfer Ownership component. You can override this action using the following code snippet.
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 Transfer Ownership component is as follows.
Event | Description |
---|---|
ccOwnershipChanged | Triggers when the ownership of a group member is changed successfully |
CometChatGroupEvents
Listener’s
TransferOwnershipStyle
to the Transfer Ownership Component to customize the styling.
Property | Description | Code |
---|---|---|
border | Used to set border | border?: string, |
borderRadius | Used to set border radius | borderRadius?: string; |
background | Used to set background colour | background?: string; |
height | Used to set height | height?: string; |
width | Used to set width | width?: string; |
MemberScopeTextColor | Used to set member scope text color | MemberScopeTextColor?: string, |
MemberScopeTextFont | Used to set member scope text font | MemberScopeTextFont?: string; |
transferButtonTextFont | Used to set transfer button text font | transferButtonTextFont?: string; |
transferButtonTextColor | Used to set transfer button text color | transferButtonTextColor?: string; |
cancelButtonTextFont | Used to set cancel button text font | cancelButtonTextFont?: string; |
cancelButtonTextColor | Used to set cancel button text color | cancelButtonTextColor?: string; |
Avatar
component in the Transfer Ownership Component, you can use the following code snippet. For further insights on Avatar
Styles refer
GroupMembersStyle
to the Transfer Ownership Component to customize the styling, you can use the following code snippet. For further insights on GroupMembers
Styles refer
List Item
component in the Transfer Ownership
Component, you can use the following code snippet. For further insights on List Item
Styles refer
Property | Description | Code |
---|---|---|
title | Used to set title in the app heading | [title]="Your Custom Title" |
cancelButtonText | Used to set the cancel button text | [cancelButtonText]="Your Custom cancel button text" |
transferButtonText | Used to set the transfer button text | [transferButtonText]="Your Custom transfer button text" |
errorStateText | Used to set a custom text response when some error occurs on fetching the list of group members | [errorStateText]="your custom error state text" |
emptyStateText | Used to set a custom text response when fetching the group members has returned an empty list | [emptyStateText]="your custom empty state text" |
searchPlaceholder | Used to set custom search placeholder text | [searchPlaceholder]='Custom Search PlaceHolder' |
searchIconURL | Used to set search Icon in the search field | [searchIconURL]="'Your Custom search icon'" |
loadingIconURL | Used to set loading Icon | [loadingIconURL]="'your custom loading icon url'" |
closeButtonIconURL | Used to set close button Icon | [closeButtonIconURL]="closeButtonIconURL" |
hideSearch | Used to toggle visibility for search box | [hideSearch]="true"" |
hideSeparator | Used to hide the divider separating the user items | [hideSeparator]="true" |
disableUsersPresence | Used to toggle functionality to show user’s presence | [disableUsersPresence]="true" |
titleAlignment | Alignment of the heading text for the component | [titleAlignment]="titleAlignment" |
group | Used to pass group object of which group members will be shown | [group]="groupObject" |
loadingStateView
to match the loading view of your app.
Default:
EmptyStateView
using emptyStateView
to match the empty view of your app.
Default:
ErrorStateView
using errorStateView
to match the error view of your app.
Default: