about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/view/com/util/Views.web.tsx21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx
index ffea9fe2e..21998bfbd 100644
--- a/src/view/com/util/Views.web.tsx
+++ b/src/view/com/util/Views.web.tsx
@@ -32,14 +32,17 @@ interface AddedProps {
   desktopFixedHeight?: boolean | number
 }
 
-export const CenteredView = React.forwardRef(function CenteredView({
-  style,
-  sideBorders,
-  topBorder,
-  ...props
-}: React.PropsWithChildren<
-  ViewProps & {sideBorders?: boolean; topBorder?: boolean}
->) {
+export const CenteredView = React.forwardRef(function CenteredView(
+  {
+    style,
+    sideBorders,
+    topBorder,
+    ...props
+  }: React.PropsWithChildren<
+    ViewProps & {sideBorders?: boolean; topBorder?: boolean}
+  >,
+  ref: React.Ref<View>,
+) {
   const pal = usePalette('default')
   const {isMobile} = useWebMediaQueries()
   if (!isMobile) {
@@ -58,7 +61,7 @@ export const CenteredView = React.forwardRef(function CenteredView({
     })
     style = addStyle(style, pal.border)
   }
-  return <View style={style} {...props} />
+  return <View ref={ref} style={style} {...props} />
 })
 
 export const FlatList_INTERNAL = React.forwardRef(function FlatListImpl<ItemT>(