You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-16Lines changed: 19 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -87,27 +87,30 @@ You can import it as a custom component:
87
87
| currentUserId (1) |[String, Number]| true | - |
88
88
| rooms | Array | - |[]|
89
89
| loadingRooms (2) | Boolean | - | false |
90
+
| roomId (3) |[String, Number]| - | null |
90
91
| messages | Array | - |[]|
91
-
| messagesLoaded (3) | Boolean | - | false |
92
-
| menuActions (4) | Array | - |[]|
93
-
| messageActions (5) | Array | - | (4) |
92
+
| messagesLoaded (4) | Boolean | - | false |
93
+
| menuActions (5) | Array | - |[]|
94
+
| messageActions (6) | Array | - | (4) |
94
95
| showAddRoom | Boolean | - | true |
95
96
| showFiles | Boolean | - | true |
96
97
| showEmojis | Boolean | - | true |
97
98
| showReactionEmojis | Boolean | - | true |
98
-
| textMessages (6) | Object | - | null |
99
-
| responsiveBreakpoint (7) | Number | - | 900 |
100
-
| singleRoom (8) | Number | - | false |
101
-
| theme (9) | Sring | - | light |
102
-
| styles (10) | Object | - | (10) |
99
+
| textMessages (7) | Object | - | null |
100
+
| responsiveBreakpoint (8) | Number | - | 900 |
101
+
| singleRoom (9) | Number | - | false |
102
+
| theme (10)| Sring | - | light |
103
+
| styles (11) | Object | - | (10) |
103
104
104
105
(1) `currentUserId` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
105
106
106
107
(2) `loadingRooms` can be used to show/hide a spinner icon while rooms are loading
107
108
108
-
(3) `messagesLoaded` must be manually set to `true` when all messages of a conversation have been loaded. Meaning the user cannot scroll on top anymore
109
+
(3) `roomId` can be used to load a specific room at any time
109
110
110
-
(4) `menuActions` can be used to display your own buttons when clicking the vertical dots icon inside a room.<br>
111
+
(4) `messagesLoaded` must be manually set to `true` when all messages of a conversation have been loaded. Meaning the user cannot scroll on top anymore
112
+
113
+
(5) `menuActions` can be used to display your own buttons when clicking the vertical dots icon inside a room.<br>
111
114
You can then use the [menuActionHandler](#events-api) event to call your own action after clicking a button. Ex:
112
115
113
116
```javascript
@@ -127,7 +130,7 @@ menuActions="[
127
130
]"
128
131
```
129
132
130
-
(5) `messageActions` can be used to display your own buttons when clicking the dropdown icon inside a message.<br>
133
+
(6) `messageActions` can be used to display your own buttons when clicking the dropdown icon inside a message.<br>
131
134
You can then use the [messageActionHandler](#events-api) event to call your own action after clicking a button. Ex:
132
135
133
136
```javascript
@@ -167,7 +170,7 @@ messageActions="[
167
170
]"
168
171
```
169
172
170
-
(6) `textMessages` can be used to replace default texts. Ex:
173
+
(7) `textMessages` can be used to replace default texts. Ex:
171
174
172
175
```javascript
173
176
textMessages="{
@@ -180,13 +183,13 @@ textMessages="{
180
183
}"
181
184
```
182
185
183
-
(7) `responsiveBreakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
186
+
(8) `responsiveBreakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
184
187
185
-
(8) `singleRoom` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
188
+
(9) `singleRoom` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
186
189
187
-
(9) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
190
+
(10) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
188
191
189
-
(10) `styles` can be used to customize your own theme. Ex:
192
+
(11) `styles` can be used to customize your own theme. Ex:
0 commit comments