Default UI state for PropTypes.bool props always render to true (switched on) regardless of the defaultProps of false.
Looks like this line is relevant:
|
const defaultProps = this._properties[prop] || values; |
const defaultProps = this._properties[prop] || values;
this._properties[prop] is either false, the value from the component's defaultProps, or undefined because defaultProps aren't accounted for here (if I understand this piece correctly).
So it falls back to the default value which is true for PropTypes.bool.
Default UI state for
PropTypes.boolprops always render totrue(switched on) regardless of thedefaultPropsoffalse.Looks like this line is relevant:
atellier/src/PropertiesContainer.js
Line 117 in 19587d3
this._properties[prop]is eitherfalse, the value from the component'sdefaultProps, orundefinedbecausedefaultPropsaren't accounted for here (if I understand this piece correctly).So it falls back to the default value which is
trueforPropTypes.bool.