react-native-actions-sheet icon indicating copy to clipboard operation
react-native-actions-sheet copied to clipboard

closeAnimationConfig doesnt work

Open Taloqq opened this issue 2 years ago • 2 comments

I want to make the closing animation slower, but closeAnimationConfig doesnt seem to work as it should. When I give the same config to openAnimationConfig, it does work. For some of the configs it behaves weirdly instead of having no effect at all. For example if I give the closeAnimationConfig a mass of 100, it flickers as it closes, but doesnt have any slowing effect on it.

<ActionSheet 
      id={props.sheetId}
      indicatorStyle={styles.indicatorLine}
      gestureEnabled={true}
      containerStyle={styles.container}
      closeAnimationConfig={closeAnimationConfig}
      openAnimationConfig={openAnimationConfig}
    >
const closeAnimationConfig = {
  mass: 100
};

useNativeDriver: true has no effect on this issue.

Taloqq avatar Oct 05 '22 05:10 Taloqq

Nobody else with this issue?

Taloqq avatar Oct 25 '22 08:10 Taloqq

Can confirm close animation config works, looks more like an issue with your spring properties / animation config more than anything else. Try:

  closeAnimationConfig={{
        stiffness: 95.8,
        damping: 14.7,
        mass: 1,
      }}
      ```