react-native-checkbox icon indicating copy to clipboard operation
react-native-checkbox copied to clipboard

when default value is true don't set checkedImage

Open gurbela opened this issue 6 years ago • 1 comments

checkbox onChange => works correctly, but when checkbox value default is true it's not works.

example: currentWork : boolean

<CheckBox label='' onChange={() => {setCurrentWork(!currentWork)}} value={currentWork} checkboxStyle={styles.checkbox} checkedImage={CHECKED_ICON} uncheckedImage={UNCHECKED_ICON} />

gurbela avatar Jul 23 '19 13:07 gurbela

Try onValueChange => instead. As per documentation onValuechange is said to be "Invoked with the new boolean value when it changes".

archulan avatar Nov 21 '19 04:11 archulan