Skip to content

Commit

Permalink
Merge pull request #413 from Instawork/florent/scrollbar-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
flochtililoch authored Apr 18, 2022
2 parents 8aa49ca + 1a1ec3d commit 158b41f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/hv-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export default class HvView extends PureComponent<HvComponentProps> {
props.showsHorizontalScrollIndicator = horizontal && showScrollIndicator;
props.showsVerticalScrollIndicator = !horizontal && showScrollIndicator;

// Fix scrollbar rendering issue in iOS 13+
// https://github.com/facebook/react-native/issues/26610#issuecomment-539843444
if (Platform.OS === 'ios' && parseInt(Platform.Version, 10) >= 13) {
props.scrollIndicatorInsets = { right: 1 };
}

if (horizontal) {
props.horizontal = true;
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/hv-view/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ export type InternalProps = {|
style?: ?Array<StyleSheet>,
testID?: ?string,
children?: ?any,
scrollIndicatorInsets?: {
bottom?: number,
left?: number,
right?: number,
top?: number,
},
stickyHeaderIndices?: ?(number[]),
|};

0 comments on commit 158b41f

Please sign in to comment.