-
Notifications
You must be signed in to change notification settings - Fork 481
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
Added support for multi-line text input for Doctor Notes #6977
Added support for multi-line text input for Doctor Notes #6977
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM, but the PR title does not give clarity. It could have been something like: "Added support for multi-line text input for Doctor Notes"
CC: @rithviknishad |
@nihal467 made changes |
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.
-
Define a max height. If the notes is of 1000 lines, we don't want it to be of 1000 lines high, instead cap it to a certain limit.
-
Could you make this as a reusable component named:
AutoExpandingTextInputFormField
instead? This would also require to use a ref instead ofgetElementById
On it |
@rithviknishad @nihal467 |
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.
LGTM, but one thing left.
As specified in the previous review, consider using a ref instead of ID.
@Ashesh3 @rithviknishad |
LGTM |
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.
@kshitijv256 a minor suggestion
if (myref.current == null) return; | ||
const text = myref.current.textContent?.split("\n"); | ||
const len = (text?.length == 0 ? 1 : text?.length) || 1; | ||
const height = Math.min(len * 18, (props.maxHeight || 160) - 28) + 28; |
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.
@kshitijv256 instead of using haedcoded value when not get the line height from styles and then use it, just a thought
Thanks for the suggestion, I hadn't thought of it. |
@kshitijv256 what is the status of this PR |
Last time @khavinshankar suggested some changes which I have added. So this PR should be completed |
LGTM |
@kshitijv256 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌. |
Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Screenshots