Skip to content

Commit

Permalink
Merge pull request #796 from thundersdata-frontend/form-issue
Browse files Browse the repository at this point in the history
fix: 修复TextArea在FormItem下高度无法生效的问题
  • Loading branch information
chj-damon authored Dec 26, 2023
2 parents 9c8ccc0 + 611199f commit e7aec15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-trees-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@td-design/react-native': patch
---

fix: 修复TextArea在FormItem下高度无法生效的问题
4 changes: 2 additions & 2 deletions packages/react-native/src/input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const TextArea = forwardRef<TextInput, TextAreaProps>(

const styles = StyleSheet.create({
input: {
height,
height: '100%',
padding: theme.spacing.x2,
fontSize: px(14),
lineHeight: px(20),
Expand All @@ -68,7 +68,7 @@ const TextArea = forwardRef<TextInput, TextAreaProps>(
return (
<Box>
<Label {...{ label, required, labelHeight }} />
<Box borderWidth={border ? ONE_PIXEL : 0} borderColor="border" style={style}>
<Box borderWidth={border ? ONE_PIXEL : 0} borderColor="border" style={[style, { height }]}>
<TextInput
ref={ref}
textAlignVertical="top"
Expand Down

0 comments on commit e7aec15

Please sign in to comment.