aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/comments/AddComment.tsx2
-rw-r--r--src/components/common/TaggTypeahead.tsx2
-rw-r--r--src/utils/comments.tsx5
3 files changed, 3 insertions, 6 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx
index 7e440daf..9cf10b5e 100644
--- a/src/components/comments/AddComment.tsx
+++ b/src/components/comments/AddComment.tsx
@@ -123,7 +123,7 @@ const AddComment: React.FC<AddCommentProps> = ({momentId, placeholderText}) => {
);
}}
inputRef={ref}
- partTypes={mentionPartTypes('blue', ref)}
+ partTypes={mentionPartTypes('blue')}
/>
<View style={styles.submitButton}>
<TouchableOpacity style={styles.submitButton} onPress={addComment}>
diff --git a/src/components/common/TaggTypeahead.tsx b/src/components/common/TaggTypeahead.tsx
index bef72851..fcf196bd 100644
--- a/src/components/common/TaggTypeahead.tsx
+++ b/src/components/common/TaggTypeahead.tsx
@@ -8,7 +8,6 @@ import {SCREEN_WIDTH} from '../../utils';
import TaggUserRowCell from './TaggUserRowCell';
const TaggTypeahead: React.FC<MentionSuggestionsProps> = ({
- textRef,
keyword,
onSuggestionPress,
}) => {
@@ -53,7 +52,6 @@ const TaggTypeahead: React.FC<MentionSuggestionsProps> = ({
name: user.username,
});
setResults([]);
- textRef.current.focus();
}}
user={user}
/>
diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx
index d7091d1e..0d551682 100644
--- a/src/utils/comments.tsx
+++ b/src/utils/comments.tsx
@@ -78,14 +78,13 @@ export const renderTextWithMentions: React.FC<RenderProps> = ({
);
};
-export const mentionPartTypes: (style: 'blue' | 'white', textRef: any) => PartType[] = (
+export const mentionPartTypes: (style: 'blue' | 'white') => PartType[] = (
style,
- textRef
) => {
return [
{
trigger: '@',
- renderSuggestions: (props) => <TaggTypeahead textRef={textRef} {...props} />,
+ renderSuggestions: (props) => <TaggTypeahead {...props} />,
allowedSpacesCount: 0,
isInsertSpaceAfterMention: true,
textStyle: