Skip to content

Commit

Permalink
FI-2686: Automatically resize textareas (#491)
Browse files Browse the repository at this point in the history
* disbale row limit

* remove limits on row count

* bound to 20 max rows

---------

Co-authored-by: Alyssa Wang <[email protected]>
  • Loading branch information
AlyssaWang and AlyssaWang authored Jun 21, 2024
1 parent 933be37 commit 0f07266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client/src/components/InputsModal/InputTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const InputTextField: FC<InputTextFieldProps> = ({
color="secondary"
fullWidth
multiline={requirement.type === 'textarea'}
rows={requirement.type === 'textarea' ? 4 : 1}
minRows={requirement.type === 'textarea' ? 4 : 1}
maxRows={20}
value={inputsMap.get(requirement.name)}
onBlur={(e) => {
if (e.currentTarget === e.target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ const SelectionPanel: FC<SelectionPanelProps> = ({
{showBackButton && <Box minWidth="45px" />}
</Box>

<Box px={2} pb={2} overflow="auto">
<Box px={2} overflow="auto">
{options && options.length > 0 ? (
renderSelection()
) : (
<Typography mt={2}> No options available.</Typography>
<Typography m={2}> No options available.</Typography>
)}
</Box>

<Box px={2}>
<Box px={4} pb={1}>
<Button
variant="contained"
size="large"
Expand Down

0 comments on commit 0f07266

Please sign in to comment.