-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed the disability issue while selecting emojis #609
Conversation
@@ -42,7 +43,9 @@ const ChatInputFormattingToolbar = ({ | |||
|
|||
const handleEmojiClick = (emojiEvent) => { | |||
const [emoji] = emojiEvent.names; | |||
messageRef.current.value += ` :${emoji.replace(/[\s-]+/g, '_')}: `; | |||
const newValue = messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, @smritidoneria.
LGTM! Can you please give a meaningful name to this variable instead of newValue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,sure
I have the updated the name |
Hey, do I have to make improvements in the pr or is it ready to get merge? |
It will be merged soon ! |
Hey @smritidoneria Please format your code using prettier |
done |
Any more changes required? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @smritidoneria !
@@ -42,7 +43,10 @@ const ChatInputFormattingToolbar = ({ | |||
|
|||
const handleEmojiClick = (emojiEvent) => { | |||
const [emoji] = emojiEvent.names; | |||
messageRef.current.value += ` :${emoji.replace(/[\s-]+/g, '_')}: `; | |||
const updatedMessageWithEmoji = | |||
messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's complaining because of this
messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `;
can we instead do
`${messageRef.current.value} :${emoji.replace(/[\s-]+/g, '_')}: `
also, can you check if messageRef.current.value
can be other than a string? maybe we can add ?? ''
if it's not present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it!
04a4859
to
2845951
Compare
b9f7491
to
6e6c3b1
Compare
Brief Title
When selecting only emojis from the picker in the user input, the Send button now allows sending the emojis only.
Acceptance Criteria fulfillment
Fixes #608
Video/Screenshots
Screen.Recording.2024-07-23.at.10.06.38.AM.mov