From 841ad692d3b3b57d0a810201139af965200e0b9a Mon Sep 17 00:00:00 2001 From: Ollie H Date: Mon, 15 May 2023 11:12:38 -0700 Subject: [PATCH] Make autocomplete pressable (#620) --- .../com/composer/text-input/web/Autocomplete.tsx | 12 ++++++++---- 1 file 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 475ec119..87820b97 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( const isSelected = selectedIndex === index return ( - ( : index === items.length - 1 ? styles.lastMention : undefined, - ]}> + ]} + onPress={() => { + selectItem(index) + }} + accessibilityRole="button"> @@ -179,7 +183,7 @@ const MentionList = forwardRef( @{item.handle} - + ) }) ) : (