Skip to content

Commit

Permalink
fix(ui): fix textarea minHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Oct 25, 2022
1 parent 8bb5d0f commit 5ab8359
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/ui/src/components/textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Textarea(props: DTextareaProps, ref: React.ForwardedRef<DTextareaRef>):
const heightStyle = (() => {
let overflow: 'hidden' | undefined;
let height: number | undefined;
let minHeight: number | undefined;
let minHeight: number = lineHeight + 8;
let maxHeight: number | undefined;

if (!isUndefined(dRows)) {
Expand Down Expand Up @@ -118,7 +118,6 @@ function Textarea(props: DTextareaProps, ref: React.ForwardedRef<DTextareaRef>):
...restProps.style,
...heightStyle,
lineHeight: `${lineHeight}px`,
minHeight: `${lineHeight + 8}px`,
resize: resizable ? undefined : 'none',
}}
value={value}
Expand Down

0 comments on commit 5ab8359

Please sign in to comment.