diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-15 17:25:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 17:25:53 -0400 |
commit | a214b5f6c767cfee13c7c1b20fd70f87c5afb520 (patch) | |
tree | 83adf1d0246d03be9f4a915fa4bd380418406d4d /src | |
parent | 1cb63f69e6ce049b18704bdd39d9abda6c351233 (diff) | |
parent | 2f2c4a4559bf072cae3b2c2cb42e500c8b71db7a (diff) |
Merge pull request #510 from IvanIFChen/tma982-bugfix-mentions-view-pop-up
[TMA-982] [BUGFIX] Mentions View Height Layout
Diffstat (limited to 'src')
-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 |