CometChatUsersWithMessages
is a Composite Component that seamlessly merges the functionalities of both the Users and Messages modules. It empowers users to effortlessly navigate to any individual’s chat window by simply clicking on their respective list item in the user list.
Additionally, CometChatUsersWithMessages
inherits and encompasses all attributes available within the CometChatUsers
module, ensuring a comprehensive user experience.
Components | Description |
---|---|
Users | Users serves as a standalone component designed to establish a screen displaying a list of users , providing them with the capability to search for specific individuals. This component operates as a container, inheriting from CometChatListBase , and serves as a wrapper for the CometChatUserList component. |
Messages | Messages presents the chat interface for both individual users and group entities. It exhibits a message list containing all interactions where the loggedInUser has sent or received messages from any of these entities. |
layout.xml
file.
Users
by allowing friends and setting the limit
to 10 using the usersRequestBuilder
.
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 UsersWithMessages
does not produce any events but its component does.
Users
subcomponent to navigate the User to MessagesMessages
subcomponent to navigatefrom Messages to Details..setMenu()
, the default behavior of UsersWithMessages will also be overridden.Users
and Messages
component. Hence, each of these components will have its individual Configuration
. Configurations
expose properties that are available in its individual components.
UsersConfiguration
can be found under Users. Properties marked with the 🛑 symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Users subcomponent
You can modify the style using the UsersStyle
method.
messagesConfiguration
. You can accomplish this by employing the messagesConfiguration
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 want to hide message composer.
You can modify the style using the messagesStyle
method and hide using hide(messageComposer: bool)
method.