diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 12:30:54 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 12:30:54 -0500 |
commit | 7aa1d9010e26da14a843efab0389386144cc978a (patch) | |
tree | 31ac7916fd7e1045bce0a078d67cc1164cc2e42f /src/view/com/composer/text-input/web/Autocomplete.tsx | |
parent | 52c72d65326c2df6ada7547103c18ed41b51ebda (diff) | |
parent | 0ca096138a690f036828c49f9e95cf394b1a4339 (diff) | |
download | voidsky-7aa1d9010e26da14a843efab0389386144cc978a.tar.zst |
Merge branch 'main' into custom-algos
Diffstat (limited to 'src/view/com/composer/text-input/web/Autocomplete.tsx')
-rw-r--r-- | src/view/com/composer/text-input/web/Autocomplete.tsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 475ec119b..87820b97b 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -4,7 +4,7 @@ import React, { useImperativeHandle, useState, } from 'react' -import {StyleSheet, View} from 'react-native' +import {Pressable, StyleSheet, View} from 'react-native' import {ReactRenderer} from '@tiptap/react' import tippy, {Instance as TippyInstance} from 'tippy.js' import { @@ -158,7 +158,7 @@ const MentionList = forwardRef<MentionListRef, SuggestionProps>( const isSelected = selectedIndex === index return ( - <View + <Pressable key={item.handle} style={[ isSelected ? pal.viewLight : undefined, @@ -169,7 +169,11 @@ const MentionList = forwardRef<MentionListRef, SuggestionProps>( : index === items.length - 1 ? styles.lastMention : undefined, - ]}> + ]} + onPress={() => { + selectItem(index) + }} + accessibilityRole="button"> <View style={styles.avatarAndDisplayName}> <UserAvatar avatar={item.avatar ?? null} size={26} /> <Text style={pal.text} numberOfLines={1}> @@ -179,7 +183,7 @@ const MentionList = forwardRef<MentionListRef, SuggestionProps>( <Text type="xs" style={pal.textLight} numberOfLines={1}> @{item.handle} </Text> - </View> + </Pressable> ) }) ) : ( |