GroupsWithMessages
is a Composite Component encapsulating functionalities from the Groups and Messages components. Serving as a versatile wrapper, it seamlessly integrates with CometChatMessages, enabling users to open the module by clicking on any group within the list. This component inherits the behavior of Groups, fostering consistency and familiarity in user interactions.
Components | Description |
---|---|
Groups | The Groups component is designed to display a list of Groups . This essentially represents the recent conversation history. |
Messages | The Messages component is designed to manage the messaging interaction for Group's conversations. |
GroupsWithMessages
is a view controller, it can be effortlessly added directly in response to a button click or any event. Leveraging all the customizable properties and methods inherited from Groups, this component offers seamless integration and extensive customization capabilities. This makes it a versatile solution for enhancing user interaction within your application.
setOnItemClick
action doesn’t have a predefined behavior. You can override this action using the following code snippet.
setOnItemLongClick
action doesn’t have a predefined behavior. You can override this action using the following code snippet.
On Error
and improve error handling.
SetOnBack
feature. This capability allows you to customize the behavior associated with navigating back within your app. Utilize the provided code snippet to override default behaviors and tailor the user experience according to your specific requirements.
groupsRequestBuilder
.
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.
The GroupsWithMessages does not produce any events but its component does.
groupsWithMessagesStyle
to the GroupsWithMessages Component to customize the styling.
cometChatGroupsWithMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller..set(groupsConfiguration: groupsConfiguration)
method when initializing the CometChatGroupsWithMessages
instance.
Groups
subcomponent to navigate the user from Groups to MessagesMessages
subcomponent to navigate the user from Messages to Details..setMenu()
, the default behavior of GroupsWithMessages will also be overridden.Groups
and Messages
component. Hence, each of these components will have its individual `Configuration“.
Configurations
expose properties that are available in its individual components.groupsConfiguration
. You can accomplish this by employing the groupsConfiguration
props as demonstrated below:
GroupsConfiguration
can be found under Groups. Properties marked with the symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Groups subcomponent and, in addition, you only want to display the Group List based on only joined groups and setting the limit to 3.
You can modify the style using the groupsStyle
property and filter the list with the groupsRequestBuilder
property.
messagesConfiguration
props as demonstrated below:
MessagesConfiguration
can be found under Messages. Properties marked with the symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Messages subcomponent and, in addition, you only want to hide message header.
You can modify the style using the messagesStyle
property and hide the message header with the hideMessageHeader
property.
cometChatGroupsWithMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.joinGroupConfiguration
props as demonstrated below:
JoinGroupConfiguration
can be found under Join Group. Properties marked with the symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Join Group subcomponent.
You can modify the style using the joinGroupStyle
property.
cometChatGroupsWithMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.createGroupConfiguration
props as demonstrated below:
CreateGroupConfiguration
can be found under Create Group. Properties marked with the symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Create Group subcomponent.
You can modify the style using the createGroupStyle
property.
cometChatGroupsWithMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.