From 58f5fe2bbc88a754f8b50cdca31a179e3b8444a4 Mon Sep 17 00:00:00 2001
From: make-github-pseudonymous-again
<5165674+make-github-pseudonymous-again@users.noreply.github.com>
Date: Fri, 3 Jan 2025 08:59:57 +0100
Subject: [PATCH] :children_crossing: ux: Allow multiline inputs to grow if
contents do not fit.
Fixes #749.
This slipped through when migrating to MUI v5. See:
- https://v5.mui.com/material-ui/migration/v5-component-changes
---
imports/ui/consultations/ConsultationForm.tsx | 12 ++++++------
imports/ui/patients/PatientSheet.tsx | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/imports/ui/consultations/ConsultationForm.tsx b/imports/ui/consultations/ConsultationForm.tsx
index 81b6ca778..54bd36204 100644
--- a/imports/ui/consultations/ConsultationForm.tsx
+++ b/imports/ui/consultations/ConsultationForm.tsx
@@ -175,7 +175,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
autoFocus={Boolean(update)}
label="Motif de la visite"
placeholder="Motif de la visite"
- rows={4}
+ minRows={5}
value={reason}
margin="normal"
onChange={update?.('reason')}
@@ -187,7 +187,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
readOnly={!update}
label="Examens déjà réalisés"
placeholder="Examens déjà réalisés"
- rows={4}
+ minRows={2}
value={done}
margin="normal"
onChange={update?.('done')}
@@ -199,7 +199,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
readOnly={!update}
label="Examens à réaliser"
placeholder="Examens à réaliser"
- rows={4}
+ minRows={2}
value={todo}
margin="normal"
onChange={update?.('todo')}
@@ -211,7 +211,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
readOnly={!update}
label="Traitement"
placeholder="Traitement"
- rows={4}
+ minRows={5}
value={treatment}
margin="normal"
onChange={update?.('treatment')}
@@ -223,7 +223,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
readOnly={!update}
label="À revoir"
placeholder="À revoir"
- rows={4}
+ minRows={2}
value={next}
margin="normal"
onChange={update?.('next')}
@@ -235,7 +235,7 @@ const ConsultationForm = ({consultation, update}: Props) => {
readOnly={!update}
label="Autres remarques"
placeholder="Write some additional information about the consultation here"
- rows={4}
+ minRows={2}
value={more}
margin="normal"
onChange={update?.('more')}
diff --git a/imports/ui/patients/PatientSheet.tsx b/imports/ui/patients/PatientSheet.tsx
index e70cb4f6b..3f3c317d4 100644
--- a/imports/ui/patients/PatientSheet.tsx
+++ b/imports/ui/patients/PatientSheet.tsx
@@ -99,7 +99,7 @@ const LargeMultilineReadOnlyTextField = (props) => (
);
const SmallMultilineReadOnlyTextField = (props) => (
-
+
);
type Props = {