react-native-tab-view icon indicating copy to clipboard operation
react-native-tab-view copied to clipboard

configureTransition() is an unused property?

Open beeirl opened this issue 8 years ago • 4 comments

Actual behaviour

configureTransition() prop doesn't affect the transition between the tabs. Even my IDE gives me a hint that the prop isn't used.

Expected behaviour

I expect to modify the behavior of the tab transitions as described in the README.md.

Code sample, screenshots

{
     ... other tab config
     configureTransition: (currentTransitionProps,nextTransitionProps) => ({
          timing: Animated.spring,
          tension: 1000,
          friction: 100,
     }),
     ... other tab config
}

What have you tried

I have reviewed the implementation and figured out that it is going to be forwarded correctly to the TabViewPagerPan component. Since then there isn't any further usage of the function. The transitionTo() function, which is responsible for performing the transition (I suppose?) is based on the DefaultTransitionSpec.

const { timing, ...transitionConfig } = DefaultTransitionSpec;

Doesn't even work with the react-navigation sample: https://snack.expo.io/Sye_jJWSM

beeirl avatar Jan 20 '18 15:01 beeirl

@Druux, you managed to find any workaround/fix for this?

ananyachandra14 avatar Feb 27 '18 09:02 ananyachandra14

This was accidentally removed. I'd accept a PR to add it back.

satya164 avatar Feb 28 '18 17:02 satya164

.

long-hp avatar Apr 27 '18 08:04 long-hp

Hey, I just released a new alpha 2.0.0-alpha.0 of the library. It's rewritten using react-native-gesture-handler and react-native-reanimated addresses a many platform specific bugs and performance problems. The documentation is updated as well.

Please try the new version and see if it addresses your issue. If not, please open a new issue following the issue template.

satya164 avatar Feb 19 '19 22:02 satya164