Skip to content

Commit 2effe74

Browse files
committed
fix platform check
1 parent c346b65 commit 2effe74

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/TextInput/BaseTextInput/implementation/index.native.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Str} from 'expensify-common';
22
import type {ForwardedRef} from 'react';
33
import React, {forwardRef, useCallback, useEffect, useRef, useState} from 'react';
44
import type {GestureResponderEvent, LayoutChangeEvent, NativeSyntheticEvent, StyleProp, TextInput, TextInputFocusEventData, ViewStyle} from 'react-native';
5-
import {ActivityIndicator, Platform, StyleSheet, View} from 'react-native';
5+
import {ActivityIndicator, StyleSheet, View} from 'react-native';
66
import {useSharedValue, withSpring} from 'react-native-reanimated';
77
import Checkbox from '@components/Checkbox';
88
import FormHelpMessage from '@components/FormHelpMessage';
@@ -25,6 +25,7 @@ import useMarkdownStyle from '@hooks/useMarkdownStyle';
2525
import useStyleUtils from '@hooks/useStyleUtils';
2626
import useTheme from '@hooks/useTheme';
2727
import useThemeStyles from '@hooks/useThemeStyles';
28+
import getPlatform from '@libs/getPlatform';
2829
import isInputAutoFilled from '@libs/isInputAutoFilled';
2930
import variables from '@styles/variables';
3031
import CONST from '@src/CONST';
@@ -83,7 +84,7 @@ function BaseTextInput(
8384
) {
8485
// For iOS, we don't need to measure the text input because it already has auto grow behavior
8586
// See TextInputMeasurement.ios.tsx for more details
86-
const isExternalAutoGrowMeasurement = Platform.OS !== 'ios' && autoGrow;
87+
const isExternalAutoGrowMeasurement = getPlatform() !== CONST.PLATFORM.IOS && autoGrow;
8788

8889
const InputComponent = InputComponentMap.get(type) ?? RNTextInput;
8990
const isMarkdownEnabled = type === 'markdown';

0 commit comments

Comments
 (0)