-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
issue-1134 Insert newlines in TextAreaCell only via keyboard shortcut #1211
Conversation
Hi @pavish can you please help me with this |
@nk183 The changes required here are mostly on the
I'm marking this PR as draft since it is still being worked upon. |
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.
We had a discussion over one of our office hours over this PR, where we discussed an alternate approach. I've added it here to keep track.
- Create an optional boolean prop in
TextArea
component which decides whether or not to handle meta+enter, ctrl+enter and alt+enter. Eg.,export let addNewLineOnAllEnterKeyCombinations = false
. - Move the keydown event handler within
TextArea
and handle adding new line based on the above prop. - In
TextAreaCell
, only pass the prop's value as true. - Fix all linting errors.
This comment was marked as off-topic.
This comment was marked as off-topic.
hi @pavish I have added the required changed. |
@nk183 Thank you for your work on this PR! The changes look good to me. I've been holding off on merging this PR since there are considerable changes in related components in parallel PRs. I'll add commits to this PR to handle the changes and merge it in the upcoming week. |
This pull request has not been updated in 45 days and is being marked as stale. It will automatically be closed in 30 days if not updated by then. |
…pr/nk183/1211-2
Fixes #1134
Technical details
What this pr does
Pressing Enter with any combination of the following modifier keys inserts a newline at the users cursor position:
ToDo
Currently after inserting new line using keyboard,the textarea field focus losses
Screenshots
simplescreenrecorder-2022-03-22_15.35.14.mp4
Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin