Skip to content

Commit

Permalink
fix: allow user to override showsVerticalScrollIndicator value on scr…
Browse files Browse the repository at this point in the history
…ollables
  • Loading branch information
gorhom committed Aug 5, 2021
1 parent 51fa2b3 commit 11cdc34
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function createBottomSheetScrollableComponent<T, P>(
// props
overScrollMode = 'never',
keyboardDismissMode = 'interactive',
showsVerticalScrollIndicator = true,
style,
refreshing,
onRefresh,
Expand All @@ -53,12 +54,16 @@ export function createBottomSheetScrollableComponent<T, P>(
//#endregion

//#region variables
const scrollableAnimatedProps = useAnimatedProps(() => ({
decelerationRate:
SCROLLABLE_DECELERATION_RATE_MAPPER[animatedScrollableState.value],
showsVerticalScrollIndicator:
animatedScrollableState.value === SCROLLABLE_STATE.UNLOCKED,
}));
const scrollableAnimatedProps = useAnimatedProps(
() => ({
decelerationRate:
SCROLLABLE_DECELERATION_RATE_MAPPER[animatedScrollableState.value],
showsVerticalScrollIndicator: showsVerticalScrollIndicator
? animatedScrollableState.value === SCROLLABLE_STATE.UNLOCKED
: showsVerticalScrollIndicator,
}),
[showsVerticalScrollIndicator]
);
//#endregion

//#region styles
Expand Down

0 comments on commit 11cdc34

Please sign in to comment.