-
Notifications
You must be signed in to change notification settings - Fork 292
fix: reflect maxRows in TextareaComposer and allow to add lines #2709
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2709 +/- ##
==========================================
+ Coverage 81.74% 81.86% +0.11%
==========================================
Files 463 463
Lines 9183 9181 -2
Branches 2094 2092 -2
==========================================
+ Hits 7507 7516 +9
+ Misses 1571 1560 -11
Partials 105 105 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Size Change: -67 B (-0.01%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
| if (event.key === 'Enter' && !event.shiftKey) { | ||
| // Allow next line only on Shift + Enter. Enter is reserved for submission. | ||
| event.preventDefault(); | ||
| } |
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.
This is what shouldSubmit is for - this way we hard-code the behavior and if users decide to have shift+enter as an actual submit, they cannot really change it.
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.
Ok, I will move should submit higher and if the combination is not specified as shift + Enter then this can be executed
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.
Update: I had to just move the preventDefault call inside the condition that checks for submissions being open. When a submission is selected we want to prevent the default behavior of the textarea to add a new line.
a8f72d2 to
0cb1408
Compare
## [13.0.1](v13.0.0...v13.0.1) (2025-05-15) ### Bug Fixes * clear composer state optimistically with snapshot restoration upon sending a message ([#2710](#2710)) ([b6e91a2](b6e91a2)) * inject error into PollComposer state if native numeric field validation fails ([#2702](#2702)) ([8bca9f0](8bca9f0)) * prevent sorting poll options in place ([#2699](#2699)) ([88590f1](88590f1)) * reflect maxRows in TextareaComposer and allow to add lines ([#2709](#2709)) ([990e15c](990e15c)) * reset message composer state partially when poll message is sent ([#2703](#2703)) ([5708807](5708807))
|
🎉 This PR is included in version 13.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎯 Goal
Fixes #2705
Closes REACT-381