Fix Gif Select dialog search bar scrolling away (#8874)
* fix flatlist dialogs on web * tweak gif select dialog, add style prop to textfield
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user