react-native/Libraries/Components/Switch
Emily Janzer 4260907b90 Pass through track color values for true/false to native component
Summary:
There's a bug in the OSS Switch component where the track color value is reset to the default value when the switch is toggled. It looks like the Java class resets the track color value in `setOn` (which fires in a press event): https://fburl.com/vmugfzja but these values aren't actually initialized from JS - in Switch.js we only pass through the current track color: https://fburl.com/vytekd0o.

The React component already has an API for defining both true/false track colors. However, we should also make sure not to reset these values for people using the old API of `tintColor`/`onTintColor`, so I'm changing it to only reset the value when both of those props are null.

Reviewed By: mdvacca

Differential Revision: D14035007

fbshipit-source-id: 12d968076bd47d54deedbfc15b12ff3cd77e2fd0
2019-03-22 18:27:21 +01:00
..
Switch.js Pass through track color values for true/false to native component 2019-03-22 18:27:21 +01:00
SwitchNativeComponent.js Unify native props 2019-01-07 15:39:21 -08:00
SwitchSchema.js Move codegen into packages/react-native-codegen 2019-02-07 03:09:05 -08:00