Skip to content

Commit

Permalink
Merge pull request #33 from hannojg/feat/scrollview-add-scrollvar-pos…
Browse files Browse the repository at this point in the history
…ition

feat: add `verticalScrollbarPosition` prop to `ScrollView`
  • Loading branch information
Beamanator authored Nov 21, 2022
2 parents 6e9d4bf + 95d3b1f commit 99c26e2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,15 @@ public void setPointerEvents(ReactScrollView view, @Nullable String pointerEvent
public void setScrollEventThrottle(ReactScrollView view, int scrollEventThrottle) {
view.setScrollEventThrottle(scrollEventThrottle);
}

@ReactProp(name = "verticalScrollbarPosition")
public void setVerticalScrollbarPosition(ReactScrollView view, String position) {
if ("right".equals(position)) {
view.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT);
} else if ("left".equals(position)) {
view.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);
} else {
view.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_DEFAULT);
}
}
}

0 comments on commit 99c26e2

Please sign in to comment.