Skip to content

Commit 346499c

Browse files
authored
Merge pull request #3957 from Northeastern-Electric-Racing/#3921-multi-line-notes
#3921 multi line notes
2 parents 0dded37 + 7fcb1c3 commit 346499c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/TaskList/TaskFormModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ const TaskFormModal: React.FC<TaskFormModalProps> = ({ task, onSubmit, modalShow
9292
reset();
9393
}}
9494
onKeyPress={(e) => {
95-
e.key === 'Enter' && e.preventDefault();
95+
const target = e.target as HTMLElement;
96+
if (e.key === 'Enter' && target.tagName !== 'TEXTAREA') {
97+
e.preventDefault();
98+
}
9699
}}
97100
>
98101
<Grid container spacing={2}>

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/TaskList/TaskModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const TaskModal: React.FC<TaskModalProps> = ({ task, teams, modalShow, onHide, o
7373
<Grid item xs={12} md={6}>
7474
<Typography fontWeight={'bold'}>Notes:</Typography>
7575
<Box sx={{ height: 'auto', overflow: 'auto' }}>
76-
<Typography>{task.notes}</Typography>
76+
<Typography sx={{ whiteSpace: 'pre-wrap' }}>{task.notes}</Typography>
7777
</Box>
7878
</Grid>
7979
</Grid>

0 commit comments

Comments
 (0)