Skip to content

Commit

Permalink
add verticalScrollbarPosition prop to ScrollView
Browse files Browse the repository at this point in the history
This is a temporary addition to help circumvent a bug on android.
Long term we want to fix the root cause of the problem.

- RN issue: facebook#35350
- Expensify issue: Expensify/App#11321 (comment)
  • Loading branch information
hannojg authored Nov 17, 2022
1 parent 6e9d4bf commit 95d3b1f
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 95d3b1f

Please sign in to comment.