Open sompylasar opened 8 years ago
Looks like there is more to this issue.
The component props are not initialized with defaultProps in the Workspace state: https://github.com/scup/atellier/blob/375cf7c606d129352863aa9548415610ef764b07/src/Workspace.js#L20
The falsy values are nullified here: https://github.com/scup/atellier/blob/375cf7c606d129352863aa9548415610ef764b07/src/PropertiesContainer.js#L102-L103
Related: #41
+1
Default UI state for
PropTypes.bool
props always render totrue
(switched on) regardless of thedefaultProps
offalse
.Looks like this line is relevant: https://github.com/scup/atellier/blob/19587d32278176a25bc720e8a3f23f5b5f668f62/src/PropertiesContainer.js#L117
this._properties[prop]
is eitherfalse
, the value from the component'sdefaultProps
, orundefined
becausedefaultProps
aren't accounted for here (if I understand this piece correctly).So it falls back to the default value which is
true
forPropTypes.bool
.