Closed markterence closed 6 years ago
This is a fix for issue #16 and #12.
The code causes the error. picker/index.js#L27
Object.assign(styles.pickerMainAndroid, { backgroundColor: theme.pickerBgColor, borderBottomColor: theme.inputBorderColor, borderBottomWidth: theme.borderWidth, })
I found two ways to prevent this error.
Error : You attempted to set the key backgroundcolor with the value "transparent" on an object that is meant to be immutables and has been frozen.
A. Using Spread Operator (...) (This is what i used)
<View style={{...styles.pickerMainAndroid, ...{ backgroundColor: theme.pickerBgColor, borderBottomColor: theme.inputBorderColor, borderBottomWidth: theme.borderWidth, }}} >
B. Using Object.assign()
<View style={Object.assign({}, styles.pickerMainAndroid, { backgroundColor: theme.pickerBgColor, borderBottomColor: theme.inputBorderColor, borderBottomWidth: theme.borderWidth, })} >
This is a fix for issue #16 and #12.
The code causes the error. picker/index.js#L27
I found two ways to prevent this error.
A. Using Spread Operator (...) (This is what i used)
B. Using Object.assign()