Skip to content

Commit

Permalink
fix: fix diffClamp tabs sync
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroBern committed Jan 26, 2021
1 parent 2b8b194 commit 304e8cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/createCollapsibleTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ const createCollapsibleTabs = <
accDiffClamp.value = withTiming(headerHeight)
}
} else {
// todo scroll snap
accDiffClamp.value = withTiming(0)
}
}
} else {
Expand Down Expand Up @@ -479,6 +479,12 @@ const createCollapsibleTabs = <
) {
// sync up
nextPosition = scrollYCurrent.value
} else if (
diffClampEnabled &&
(accDiffClamp.value > tabScrollY || tabScrollY <= headerHeight)
) {
// todo perf if snapEnabled
nextPosition = accDiffClamp.value
} else if (
tabScrollY < scrollYCurrent.value &&
tabScrollY < headerHeight
Expand Down

0 comments on commit 304e8cc

Please sign in to comment.