Transfer Ownership
This component 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:
- Administrative Control: The current owner or administrator of the group has the authority to initiate the transfer of ownership. This feature is typically available to ensure flexibility and allow smooth transitions of group ownership.
- New Group Owner: During the transfer process, the current owner can select a specific user from the group members to become the new owner. This new owner will then assume the responsibilities and privileges associated with being the group owner.
- Administrative Privileges: As the new owner, the designated user will gain full administrative control over the group. They will have the ability to manage group settings, add or remove members, moderate conversations, and perform other administrative actions.
- Group Continuity: Transferring ownership does not disrupt the existing group or its content. The transfer ensures the continuity of the group while transferring the administrative control to a new owner.
Properties
Group Information
Group details associated with the group members.
Name | Type | Description |
---|---|---|
group | Group Class | Transfer ownership of this particular CometChat group |
Title
Heading text for the component
Name | Type | Description |
---|---|---|
title | string | Heading text for the component |
titleAlignment | string | Alignment of the heading text for the component |
Search
This involves keywords, phrases, or criteria into the search bar and retrieving relevant results based on the search query.
Name | Type | Description |
---|---|---|
searchPlaceholder | string | Sample text that appears in the search input as a prompt or suggestion |
searchIconURL | string | Asset URL for the search icon. |
hideSearch | boolean | When set to true, hides the search input. |
Loading state
This refers to the state of the groups component when it is actively retrieving or fetching data.
Name | Type | Description |
---|---|---|
loadingIconURL | string | Asset URL for the loading indicator icon |
loadingStateView | view | User-defined component to customise the loading indicator |
Empty state
This refers to the state of the groups component when it has no content or data to display
Name | Type | Description |
---|---|---|
emptyStateText | string | The textual content displayed in the empty state of the component. |
emptyStateView | view | User-defined component to customise the empty state of the component. |
Error state
This refers to the state of the groups component when an error occurs during the retrieval of the data.
Name | Type | Description |
---|---|---|
errorStateText | string | The textual content displayed in the error state of the component. |
errorStateView | view | User-defined component to customise the error state of the component. |
RequestBuilder
This provides set of methods that allow developers to easily create and configure group members before fetching them for the intended recipients.
Name | Type | Description |
---|---|---|
searchRequestBuilder | CometChat.GroupMembersRequestBuilder | Class that allows you to set various parameters to the GroupMembersRequestBuilder class based on which the group members are searched |
groupMembersRequestBuilder | CometChat.GroupMembersRequestBuilder | Class that allows you to set various parameters to the GroupMembersRequestBuilder class based on which the group members are fetched |
Toggle
Switch to hide or show the separators, and error message.
Name | Type | Description |
---|---|---|
hideError | boolean | When set to true, hides the error messages displayed within the component |
hideSeparator | boolean | When set to true, hides the separator between the individual elements in the list. |
disableUsersPresence | boolean | When set to true, Users will not be able to see whether a particular user is currently online or offline. |
Custom view
UI component created and customised by the developer to meet your design or functional requirements.
Name | Type | Description |
---|---|---|
subtitleView | Function as PropType<(bannedMember: CometChat.GroupMember) => ViewType> | User-defined component to customise the secondary text shown in the banned member profile. |
Function Callback
Functions that can be invoked by the user in response to a specific event or condition.
Name | Type | Description |
---|---|---|
onTransferOwnership | Function as PropType<(member: CometChat.GroupMember) => void> | Override the method that is invoked when clicks on the transfer ownership submit button |
onBack | Function as PropType<()=>void> | Override the method that is invoked when the user clicks on the back button. |
onError | Function as PropType<(error: CometChat.CometChatException) => void> | Override the method that is invoked when an error is encountered within the component |
Style
Styling properties and values of the groups component
Name | Type | Description |
---|---|---|
avatarStyle | AvatarStyle | Styling properties and values of the Avatar component |
statusIndicatorStyle | StatusIndicator | Styling properties and values of the StatusIndicator component |
listItemStyle | ListItemStyle | Styling properties and values of the ListItem component |
groupMembersStyle | GroupMembersStyle | Styling properties and values of the GroupMembers component |
transferOwnershipStyle | TransferOwnershipStyle | Styling properties and values of the TransferOwnership component |
Events
To handle events supported by CometChatTransferOwnership
you have to add the listeners mentioned here.
- Vue
onBeforeMount(() => {
CometChatGroupEvents.ccOwnershipChanged.subscribe(
({ item: IOwnershipChanged }) => {
//Proceed with UI updates
}
);
CometChatGroupEvents.ccOwnershipChanged.subscribe(
({ item: IOwnershipChanged }) => {
//Proceed with UI updates
}
);
});
onBeforeUnmount(() => {
CometChatGroupEvents.ccOwnershipChanged.unsubscribe();
CometChatGroupEvents.ccOwnershipChanged.unsubscribe();
});
Usage
- Vue
//custom style properties
const transferOwnershipStyle:TransferOwnershipStyle = new TransferOwnershipStyle({
background:"",
border:"",
MemberScopeTextColor:"",
MemberScopeTextFont:"",
})
//apply custom styling to the CometChatTransferOwnership component
<CometChatTransferOwnership :transferOwnershipStyle="transferOwnershipStyle">
</cCometChatTransferOwnership>