Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange width behavior on IOS #19302

Closed
3 tasks done
felippepuhle opened this issue May 16, 2018 · 3 comments
Closed
3 tasks done

Strange width behavior on IOS #19302

felippepuhle opened this issue May 16, 2018 · 3 comments
Labels
API: Animated Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@felippepuhle
Copy link

I created a custom tab component and I got a strange width behavior on IOS (Android seems to be fine). Every time I use Animated to change the current tab, the previous one loses a bit of width. I tried a lot of implementations, and all of them got the same result... The strange fact is: if I use setValue() instead of Animated.timing, the bug won't occur.

PS: I decided to create this custom tab 'cause the existing one use ScrollView to handle the 'swipe gesture'(dragging to change tab), and I use a FlatList at the tab content... This was causing a lot of onEndReached calls... see satya164/react-native-tab-view#501

Demo

Environment

Environment:
  OS: macOS High Sierra 10.13.4
  Node: 8.9.0
  Yarn: 0.24.6
  npm: 5.7.1
  Watchman: 4.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: 3.1 AI-173.4670197

Packages: (wanted => installed)
  react: ^16.3.0 => 16.3.2
  react-native: 0.55.4 => 0.55.4

Steps to Reproduce

See https://snack.expo.io/rksdq1qCf

Expected Behavior

Don't change tab width whenever I change the current tab.

Actual Behavior

Every time I change the tab, the previous one lost some width, overriding my style

@RomualdPercereau
Copy link

It looks like the bug only occurs then:
useNativeDriver: false

@felippepuhle
Copy link
Author

already tried to set uesNativeDriver: true, but it seems native driver doesn't support color style prop 😢

@felippepuhle
Copy link
Author

fixed! used translateX instead of left, marginLeft and others... 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Animated Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants