Skip to content

Commit

Permalink
🚸 ux: Allow multiline inputs to grow if contents do not fit.
Browse files Browse the repository at this point in the history
Fixes #749.

This slipped through when migrating to MUI v5. See:
  - https://v5.mui.com/material-ui/migration/v5-component-changes
  • Loading branch information
make-github-pseudonymous-again committed Jan 6, 2025
1 parent 18c3de6 commit 58f5fe2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions imports/ui/consultations/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand All @@ -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')}
Expand All @@ -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')}
Expand All @@ -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')}
Expand All @@ -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')}
Expand All @@ -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')}
Expand Down
2 changes: 1 addition & 1 deletion imports/ui/patients/PatientSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const LargeMultilineReadOnlyTextField = (props) => (
);

const SmallMultilineReadOnlyTextField = (props) => (
<MultilineReadOnlyTextField rows={1} {...props} />
<MultilineReadOnlyTextField minRows={1} {...props} />
);

type Props = {
Expand Down

0 comments on commit 58f5fe2

Please sign in to comment.