Skip to content

Commit ffd4aa7

Browse files
committed
Update ListView ref type to allow undefined value in DemoShowroomScreen
1 parent 4b90f32 commit ffd4aa7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

boilerplate/app/components/ListView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ ListViewComponent.displayName = "ListView"
3636

3737
export const ListView = ListViewComponent as <T>(
3838
props: ListViewProps<T> & {
39-
ref?: RefObject<ListViewRef<T>>
39+
ref?: RefObject<ListViewRef<T> | undefined>
4040
},
4141
) => ReactElement

boilerplate/app/screens/DemoShowroomScreen/DemoShowroomScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const DemoShowroomScreen: FC<DemoTabScreenProps<"DemoShowroom">> =
9696
const [open, setOpen] = useState(false)
9797
const timeout = useRef<ReturnType<typeof setTimeout>>()
9898
const listRef = useRef<SectionList>(null)
99-
const menuRef = useRef<ListViewRef<DemoListItem["item"]>>(null)
99+
const menuRef = useRef<ListViewRef<DemoListItem["item"]> | undefined>(undefined)
100100
const route = useRoute<RouteProp<DemoTabParamList, "DemoShowroom">>()
101101
const params = route.params
102102

0 commit comments

Comments
 (0)