diff options
-rw-r--r-- | src/components/common/TaggTypeahead.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/common/TaggTypeahead.tsx b/src/components/common/TaggTypeahead.tsx index 672cff69..d5668a38 100644 --- a/src/components/common/TaggTypeahead.tsx +++ b/src/components/common/TaggTypeahead.tsx @@ -40,8 +40,7 @@ const TaggTypeahead: React.FC<TaggTypeaheadProps> = ({ } }, [keyword]); - const onLayout = (e: LayoutChangeEvent) => { - setHeight(e.nativeEvent.layout.height); + const onLayout = (_e: LayoutChangeEvent) => { viewRef.current?.measure( ( _fx: number, @@ -74,7 +73,6 @@ const TaggTypeahead: React.FC<TaggTypeaheadProps> = ({ return ( <View ref={viewRef} onLayout={onLayout}> - {/* <View ref={viewRef} onLayout={onLayout}> */} {!isShowBelowStyle && <View style={styles.overlay} />} <ScrollView style={[ @@ -84,6 +82,9 @@ const TaggTypeahead: React.FC<TaggTypeaheadProps> = ({ : {top: -height, margin: margin}, ]} showsVerticalScrollIndicator={false} + onLayout={(event) => { + setHeight(event.nativeEvent.layout.height); + }} keyboardShouldPersistTaps={'always'}> {results.map((user) => ( <TaggUserRowCell |