@@ -9,9 +9,6 @@ index a1b2c3d..b4c5d6e 100644
99- }), // eslint-disable-next-line react-hooks/exhaustive-deps
1010- [onTabPress]);
1111+ },
12- + scrollResync: () => {
13- + toggleSyncScrollFrame(true);
14- + },
1512+ scrollToTop: () => {
1613+ scrollYCurrent.value = 0;
1714+ const resetMap = {};
@@ -36,7 +33,6 @@ index 38df065..c780667 100644
3633 setIndex: (index: number) => boolean;
3734 getFocusedTab: () => T;
3835 getCurrentIndex: () => number;
39- + scrollResync: () => void;
4036+ scrollToTop: () => void;
4137 };
4238 export type CollapsibleRef<T extends TabName = TabName> = RefHandler<T> | undefined;
@@ -63,9 +59,6 @@ index 9ec4cfe..3a068c9 100644
6359 getCurrentIndex: () => {
6460 return index.value
6561 },
66- + scrollResync: () => {
67- + toggleSyncScrollFrame(true)
68- + },
6962+ scrollToTop: () => {
7063+ scrollYCurrent.value = 0
7164+ const resetMap: Record<string, number> = {}
@@ -83,7 +76,7 @@ index 9ec4cfe..3a068c9 100644
8376 }),
8477 // eslint-disable-next-line react-hooks/exhaustive-deps
8578- [onTabPress]
86- + [onTabPress]
79+ + [onTabPress, toggleSyncScrollFrame ]
8780 )
8881
8982 return (
@@ -95,7 +88,6 @@ index 00fbafc..dee894c 100644
9588 setIndex: (index: number) => boolean
9689 getFocusedTab: () => T
9790 getCurrentIndex: () => number
98- + scrollResync: () => void
9991+ scrollToTop: () => void
10092 }
10193
0 commit comments