diff options
author | dan <dan.abramov@gmail.com> | 2024-05-30 15:57:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 15:57:45 +0100 |
commit | 9d4622e713fb223942db590515c6cea36f09a732 (patch) | |
tree | 0355a7e2099486fd1f4138b1dbfb6133dc7b97ef /src | |
parent | 8de028387c939999708e521203541fceea5543d4 (diff) | |
download | voidsky-9d4622e713fb223942db590515c6cea36f09a732.tar.zst |
Fix scrolling for labeler profiles (#4286)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/Views.jsx | 11 | ||||
-rw-r--r-- | src/view/com/util/Views.web.tsx | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/view/com/util/Views.jsx b/src/view/com/util/Views.jsx index 2984a2d2d..02a2b407e 100644 --- a/src/view/com/util/Views.jsx +++ b/src/view/com/util/Views.jsx @@ -1,12 +1,7 @@ -import React from 'react' import {View} from 'react-native' import Animated from 'react-native-reanimated' +// If you explode these into functions, don't forget to forwardRef! export const FlatList_INTERNAL = Animated.FlatList -export function CenteredView(props) { - return <View {...props} /> -} - -export function ScrollView(props) { - return <Animated.ScrollView {...props} /> -} +export const CenteredView = View +export const ScrollView = Animated.ScrollView diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index 792ace140..0ebd986cb 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -31,7 +31,7 @@ interface AddedProps { desktopFixedHeight?: boolean | number } -export function CenteredView({ +export const CenteredView = React.forwardRef(function CenteredView({ style, sideBorders, topBorder, @@ -58,7 +58,7 @@ export function CenteredView({ style = addStyle(style, pal.border) } return <View style={style} {...props} /> -} +}) export const FlatList_INTERNAL = React.forwardRef(function FlatListImpl<ItemT>( { |