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

Problem with style in Switch

Open agrass opened this issue 8 years ago • 7 comments

Hi, I have an issue when I change the status of switch It show a few seconds with bad style format. Like this:

captura de pantalla 2016-09-30 a las 10 08 32 a m

Anyone know how to solve this?

I'm working with RN 0.26.2 and RMMK 0.3.2 (IOS)

Thanks!

agrass avatar Sep 30 '16 13:09 agrass

Can you try with the master branch? I know I fixed a bug with State & Switch few weeks ago but not released yet.

Crash-- avatar Sep 30 '16 13:09 Crash--

@Crash-- Hi, I'm having a problem with Switches as well. How do I use the master branch, do I just use the git repo as my target for npm?

i.e. npm i -S xinthink/react-native-material-kit#master

frederickfogerty avatar Oct 06 '16 02:10 frederickfogerty

I can confirm master fixes my problem, it was around getThumb() returning null when trying the toggle the checked state of the Switch. 🔧

frederickfogerty avatar Oct 06 '16 02:10 frederickfogerty

@Crash-- Unfortunately master does not fix this problem 😢

image

Steps to reproduce:

  1. Render a switch with <MKSwitch checked={false} />
  2. Update the switch so checked is now true programmatically (i.e. don't update by clicking) - the thumb won't move but will change colour. <MKSwitch checked={true} />
  3. Click the thumb to toggle the switch off - the switch will move left of the track.

The opposite can be done for the other side quite easily.

frederickfogerty avatar Oct 06 '16 03:10 frederickfogerty

I have the same graphical issue and it appears regardless of whether I set checked via a prop

cbartondock avatar Jun 23 '17 17:06 cbartondock

Nevermind it doesn't happen when I don't have onPress set

cbartondock avatar Jun 23 '17 17:06 cbartondock

Seems to be an issue with the animation as it doesn't occur with onCheckedChange but happens with onPress. using onCheckedChange doesn't animate the switch though.

zachdixon avatar Jan 09 '18 22:01 zachdixon