react-native-material-kit icon indicating copy to clipboard operation
react-native-material-kit copied to clipboard

Switch change not animated when tied to props

Open gkrinc opened this issue 8 years ago • 5 comments

When I set the MKSwitch checked prop to a store value and set that store value when onCheckedChange fires, it's position toggles on and off, but the switch thumb doesn't animate.

<MKSwitch checked={this.props.fbShareEnabled}
                    onCheckedChange={() => this.props.fbShareSetEnabled(!this.props.fbShareEnabled)} />

What am I doing wrong? The example code for the MKSwitch provides no practical example of how to use this component :(

gkrinc avatar Nov 25 '16 16:11 gkrinc

+1

ErkanSensei avatar Dec 14 '16 02:12 ErkanSensei

did you manage to fix this?

+1

mvanroon avatar Aug 23 '17 10:08 mvanroon

Still having this issue, except I think it's tied to the onCheckedChange prop. When I use onPress instead it animates, except there's another bug with that where the circle button goes outside the switch container.

zachdixon avatar Jan 09 '18 22:01 zachdixon

This problems still's. Since.. 2016???????????

forster-thomas avatar Sep 30 '18 06:09 forster-thomas

Still a problem. Any fix?

AnumQ avatar Feb 06 '19 13:02 AnumQ