|
4 | 4 | import React, {useCallback, useMemo, useState} from 'react';
|
5 | 5 | import {useIntl} from 'react-intl';
|
6 | 6 | import {Text} from 'react-native';
|
| 7 | +import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; |
7 | 8 |
|
8 | 9 | import {updateMe} from '@actions/remote/user';
|
9 | 10 | import FloatingTextChipsInput from '@components/floating_text_chips_input';
|
@@ -34,6 +35,7 @@ const COMMA_KEY = ',';
|
34 | 35 |
|
35 | 36 | const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
36 | 37 | return {
|
| 38 | + flex: {flex: 1}, |
37 | 39 | input: {
|
38 | 40 | color: theme.centerChannelColor,
|
39 | 41 | paddingHorizontal: 15,
|
@@ -166,15 +168,8 @@ const MentionSettings = ({componentId, currentUser, isCRTEnabled}: Props) => {
|
166 | 168 |
|
167 | 169 | close();
|
168 | 170 | }, [
|
169 |
| - channelMentionOn, |
170 |
| - firstNameMentionOn, |
171 |
| - usernameMentionOn, |
172 |
| - mentionKeywords, |
173 |
| - notifyProps, |
174 |
| - mentionProps, |
175 |
| - replyNotificationType, |
176 |
| - serverUrl, |
177 |
| - currentUser, |
| 171 | + currentUser, channelMentionOn, replyNotificationType, firstNameMentionOn, |
| 172 | + usernameMentionOn, mentionKeywords, mentionProps, close, notifyProps, serverUrl, |
178 | 173 | ]);
|
179 | 174 |
|
180 | 175 | const handleFirstNameToggle = useCallback(() => {
|
@@ -226,7 +221,16 @@ const MentionSettings = ({componentId, currentUser, isCRTEnabled}: Props) => {
|
226 | 221 | useAndroidHardwareBackHandler(componentId, saveMention);
|
227 | 222 |
|
228 | 223 | return (
|
229 |
| - <> |
| 224 | + <KeyboardAwareScrollView |
| 225 | + bounces={false} |
| 226 | + enableAutomaticScroll={true} |
| 227 | + enableOnAndroid={true} |
| 228 | + keyboardShouldPersistTaps='handled' |
| 229 | + keyboardDismissMode='none' |
| 230 | + scrollToOverflowEnabled={true} |
| 231 | + noPaddingBottomOnAndroid={true} |
| 232 | + style={styles.flex} |
| 233 | + > |
230 | 234 | <SettingBlock
|
231 | 235 | headerText={mentionHeaderText}
|
232 | 236 | >
|
@@ -303,7 +307,7 @@ const MentionSettings = ({componentId, currentUser, isCRTEnabled}: Props) => {
|
303 | 307 | setReplyNotificationType={setReplyNotificationType}
|
304 | 308 | />
|
305 | 309 | )}
|
306 |
| - </> |
| 310 | + </KeyboardAwareScrollView> |
307 | 311 | );
|
308 | 312 | };
|
309 | 313 |
|
|
0 commit comments