diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-08-25 19:37:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-25 09:37:12 -0700 |
commit | 27c591f031fbe8b3a5837c4ef7082b2ce146a050 (patch) | |
tree | 0879afcfba1d6ebce926f7f4bfaa67f982bf9c1e /src/components/dialogs/GifSelect.tsx | |
parent | 7771b56a4333aa75fced8a7c05fa5458bb1f2ef5 (diff) | |
download | voidsky-27c591f031fbe8b3a5837c4ef7082b2ce146a050.tar.zst |
Fix Gif Select dialog search bar scrolling away (#8874)
* fix flatlist dialogs on web * tweak gif select dialog, add style prop to textfield
Diffstat (limited to 'src/components/dialogs/GifSelect.tsx')
-rw-r--r-- | src/components/dialogs/GifSelect.tsx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/components/dialogs/GifSelect.tsx b/src/components/dialogs/GifSelect.tsx index e18fdf2db..15c1ba26e 100644 --- a/src/components/dialogs/GifSelect.tsx +++ b/src/components/dialogs/GifSelect.tsx @@ -1,4 +1,4 @@ -import React, { +import { useCallback, useImperativeHandle, useMemo, @@ -119,7 +119,7 @@ function GifList({ [onSelectGif], ) - const onEndReached = React.useCallback(() => { + const onEndReached = useCallback(() => { if (isFetchingNextPage || !hasNextPage || error) return fetchNextPage() }, [isFetchingNextPage, hasNextPage, error, fetchNextPage]) @@ -172,7 +172,7 @@ function GifList({ </Button> )} - <TextField.Root> + <TextField.Root style={[!gtMobile && isWeb && a.flex_1]}> <TextField.Icon icon={Search} /> <TextField.Input label={_(msg`Search GIFs`)} @@ -206,11 +206,9 @@ function GifList({ renderItem={renderItem} numColumns={gtMobile ? 3 : 2} columnWrapperStyle={[a.gap_sm]} - contentContainerStyle={[ - native([a.px_xl, {minHeight: height}]), - web(a.h_full_vh), - ]} - style={[web(a.h_full_vh)]} + contentContainerStyle={[native([a.px_xl, {minHeight: height}])]} + webInnerStyle={[web({minHeight: '80vh'})]} + webInnerContentContainerStyle={[web(a.pb_0)]} ListHeaderComponent={ <> {listHeader} |