Skip to content

Commit 8471328

Browse files
duom青源duom青源
duom青源
authored and
duom青源
committed
feat: fix contentSize bug
1 parent b5a8822 commit 8471328

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/VariableTextInputView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const VariableTextInputView = forwardRef(
165165
const onContentSizeChange = (event: any) => {
166166
const { style } = props;
167167
const styles = StyleSheet.flatten(style);
168-
if (styles.height === undefined && styles.flex !== 1) {
168+
if (styles.height === undefined) {
169169
const contentSizeHeight = event.nativeEvent.contentSize.height;
170170
if (!!styles.maxHeight && contentSizeHeight >= styles.maxHeight) {
171171
setCurrentHeight(parseFloat(`${styles.maxHeight}`));
@@ -181,7 +181,7 @@ const VariableTextInputView = forwardRef(
181181
const onAndroidContentSizeChange = (event: any) => {
182182
const { style } = props;
183183
const styles = StyleSheet.flatten(style);
184-
if (styles.height === undefined && styles.flex !== 1) {
184+
if (styles.height === undefined) {
185185
const contentSizeHeight = event.nativeEvent.contentSize.height;
186186
if (!!styles.maxHeight && contentSizeHeight > styles.maxHeight) {
187187
setCurrentHeight(parseFloat(`${styles.maxHeight}`));

0 commit comments

Comments
 (0)