Skip to content

Commit 9b25a73

Browse files
committed
fix: ios max lines of input
1 parent 5d3f90b commit 9b25a73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package/src/components/AutoCompleteInput/AutoCompleteInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useCallback, useEffect, useMemo, useState } from 'react';
22
import {
33
I18nManager,
4+
Platform,
45
TextInput as RNTextInput,
56
StyleSheet,
67
TextInputProps,
@@ -69,7 +70,7 @@ const configStateSelector = (state: MessageComposerConfig) => ({
6970

7071
const MAX_NUMBER_OF_LINES = 5;
7172
const LINE_HEIGHT = 20;
72-
const PADDING_VERTICAL = 12;
73+
const INPUT_VERTICAL_PADDING = Platform.OS === 'ios' ? 7 : 12;
7374

7475
const commandPlaceHolders: Record<string, string> = {
7576
giphy: 'Search GIFs',
@@ -164,7 +165,7 @@ const AutoCompleteInputWithContext = (props: AutoCompleteInputPropsWithContext)
164165
style={[
165166
styles.inputBox,
166167
{
167-
maxHeight: LINE_HEIGHT * numberOfLines + PADDING_VERTICAL * 2,
168+
maxHeight: LINE_HEIGHT * numberOfLines + INPUT_VERTICAL_PADDING * 2,
168169
paddingLeft: command ? 0 : 16,
169170
paddingRight: command ? 4 : 8,
170171
textAlign: I18nManager.isRTL ? 'right' : 'left',

0 commit comments

Comments
 (0)