Skip to content

Commit

Permalink
Merge pull request #576 from Chen-Xi-g/fix-issue
Browse files Browse the repository at this point in the history
Fixed the issue of 'HorizontalPager' slow scrolling and 'onPageSelected' not being called.
  • Loading branch information
arkivanov committed Dec 17, 2023
2 parents 0801120 + a36e5a1 commit 5d54157
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fun <C : Any, T : Any> Pages(
}
}

DisposableEffect(state.currentPage) {
DisposableEffect(state.currentPage, state.targetPage) {
if (state.currentPage == state.targetPage) {
onPageSelected(state.currentPage)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fun <C : Any, T : Any> Pages(
}
}

DisposableEffect(state.currentPage) {
DisposableEffect(state.currentPage, state.targetPage) {
if (state.currentPage == state.targetPage) {
onPageSelected(state.currentPage)
}
Expand Down

0 comments on commit 5d54157

Please sign in to comment.