Respect initial page

This commit is contained in:
Dan Abramov
2024-11-30 18:15:15 +00:00
parent f2522aafdd
commit c06eb2b2b1
+1 -1
View File
@@ -52,7 +52,7 @@ export const Pager = forwardRef<PagerRef, React.PropsWithChildren<Props>>(
}: React.PropsWithChildren<Props>, }: React.PropsWithChildren<Props>,
ref, ref,
) { ) {
const [selectedPage, setSelectedPage] = React.useState(0) const [selectedPage, setSelectedPage] = React.useState(initialPage)
const pagerView = React.useRef<PagerView>(null) const pagerView = React.useRef<PagerView>(null)
React.useImperativeHandle(ref, () => ({ React.useImperativeHandle(ref, () => ({