Fix default for showsHorizontalScrollIndicator and showsVerticalScrollIndicator (#45258)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45258

Setting this to false, then removing, will not reset back to default state of `true`. Add explicit defaults so that the absence of the prop will lead to scroll indicators always being shown.

Changelog:
[Android][Fixed] - Fix default for `showsHorizontalScrollIndicator` and `showsVerticalScrollIndicator`

Reviewed By: javache

Differential Revision: D59285745

fbshipit-source-id: 6a7c204cfe9c4ab9e4efbbda300cdfdaf57e8f37
This commit is contained in:
Nick Gerleman
2024-07-03 10:05:13 -07:00
committed by Facebook GitHub Bot
parent d028a68026
commit 3af01a8a44
2 changed files with 2 additions and 2 deletions
@@ -80,7 +80,7 @@ public class ReactHorizontalScrollViewManager extends ViewGroupManager<ReactHori
view.setScrollEnabled(value);
}
@ReactProp(name = "showsHorizontalScrollIndicator")
@ReactProp(name = "showsHorizontalScrollIndicator", defaultBoolean = true)
public void setShowsHorizontalScrollIndicator(ReactHorizontalScrollView view, boolean value) {
view.setHorizontalScrollBarEnabled(value);
}
@@ -80,7 +80,7 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
view.setFocusable(value);
}
@ReactProp(name = "showsVerticalScrollIndicator")
@ReactProp(name = "showsVerticalScrollIndicator", defaultBoolean = true)
public void setShowsVerticalScrollIndicator(ReactScrollView view, boolean value) {
view.setVerticalScrollBarEnabled(value);
}