File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/components/MessageInput Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,12 @@ export const MessageInputWithContext = <
336336
337337 /**
338338 * Make sure to test `initialValue` functionality, if you are modifying following condition.
339+ *
340+ * We have the following condition, to make sure - when user comes out of "editing message" state,
341+ * we wipe out all the state around message input such as text, mentioned users, image uploads etc.
342+ * But it also means, this condition will be fired up on first render, which may result in clearing
343+ * the initial value set on input box, through the prop - `initialValue`.
344+ * This prop generally gets used for the case of draft message functionality.
339345 */
340346 if (
341347 ! editing &&
You can’t perform that action at this time.
0 commit comments