File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Sources/ComponentsKit/Components/TextInput Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ extension TextInputVM {
147147
148148 var maxTextInputHeight : CGFloat {
149149 if let maxRows {
150- return self . height ( forRows: maxRows)
150+ return self . height ( forRows: max ( maxRows, self . minRows ) )
151151 } else {
152152 return 10_000
153153 }
Original file line number Diff line number Diff line change @@ -55,14 +55,23 @@ public struct SUTextInput<FocusValue: Hashable>: View {
5555 TextEditor ( text: self . $text)
5656 . contentMargins ( self . model. contentPadding)
5757 . transparentScrollBackground ( )
58- . frame ( minHeight: self . model. minTextInputHeight)
59- . frame ( height: max (
60- self . model. minTextInputHeight,
61- min (
62- self . model. maxTextInputHeight,
63- self . textEditorPreferredHeight
58+ . frame (
59+ minHeight: self . model. minTextInputHeight,
60+ idealHeight: max (
61+ self . model. minTextInputHeight,
62+ min (
63+ self . model. maxTextInputHeight,
64+ self . textEditorPreferredHeight
65+ )
66+ ) ,
67+ maxHeight: max (
68+ self . model. minTextInputHeight,
69+ min (
70+ self . model. maxTextInputHeight,
71+ self . textEditorPreferredHeight
72+ )
6473 )
65- ) )
74+ )
6675 . lineSpacing ( 0 )
6776 . font ( self . model. preferredFont. font)
6877 . foregroundStyle ( self . model. foregroundColor. color)
You can’t perform that action at this time.
0 commit comments