react-native - v0.60.5
native-base - v2.13.5
It should show blank no tick box
It shows black tick
<CheckBox
style={{ borderColor: type.checked ? 'blue' : 'black' }}
checked={false}
color={'blue'}
onPress={() => true}
/>
Yes
@SupriyaKalghatgi please check
I also experience the same problem
yep same issue, this occurs after upgrading to 2.13.x
Was just going to open an issue for this as well. Happens when there is a theme added via "StyleProvider" if you remove the theme then it works as expected. 2.13.4 and 2.13.5
FYI: The issue seems to have been introduced in "CheckBox Cleanup (#2777)"
It used to default the checkBoxBgColor to "transparent" but now sets it to "checkboxDefaultColor" which from what I can tell doesn't exists in the theme variables.
Workaround is to add this to your "variable.js" file:
"checkboxDefaultColor": "transparent"
@digitalalien i already have "checkboxDefaultColor": "transparent" in my variable.js.
@imbudhiraja Are you using that as your StyleProvider theme?
yes @digitalalien i'm using style provider after ejecting the theme
Darn... that fixed it for me. So many variables though, but seems like something would have to be overriding that then. My version of themes dis not already set the "checkboxDefaultColor", but maybe yours does?
@digitalalien yes it was overridden in variable.js>material.js. thanks. But this needs to be fixed in library itself.
As a temp solution, you can add a them variable named 'checkboxDefaultColor'.
Make sure it suits the ' containerBgColor' though.
There should really be a tool or at lest documentation for the changes in the theme variables between versions...
Same solution. I just need to do it in my platform.js file.
@digitalalien Thank you for the solution.
I solve this by adding "checkboxDefaultColor": "transparent" to variables>commonColor.js with version "native-base": "^2.13.12".
I am using "native-base": "2.13.8" with "checkboxDefaultColor": "transparent" inside variables>commonColor.js.
Checkbox still shows black tick when not selected.
Need some help
I found that re-ejecting the theme fixed it for me: https://docs.nativebase.io/Customize.html#theaming-nb-headref .
Most helpful comment
FYI: The issue seems to have been introduced in "CheckBox Cleanup (#2777)"
It used to default the checkBoxBgColor to "transparent" but now sets it to "checkboxDefaultColor" which from what I can tell doesn't exists in the theme variables.
Workaround is to add this to your "variable.js" file:
"checkboxDefaultColor": "transparent"