From 3950a977d88553ed4cd74fa61912ca78f1e769f5 Mon Sep 17 00:00:00 2001 From: Ovidiu Chereches Date: Sun, 17 May 2015 14:23:05 +0300 Subject: [PATCH 1/8] Ensure default value for all state #13 --- src/components/component-playground.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/component-playground.jsx b/src/components/component-playground.jsx index 9be0424..244379f 100644 --- a/src/components/component-playground.jsx +++ b/src/components/component-playground.jsx @@ -81,7 +81,12 @@ module.exports = React.createClass({ }, getInitialState: function() { - return this.constructor.getFixtureState(this.props, []); + var defaultState = { + isEditorFocused: false + }; + + return _.assign(defaultState, + this.constructor.getFixtureState(this.props, [])); }, children: { From 75a19d77bcdd53252023ec10abbb497d87a337fb Mon Sep 17 00:00:00 2001 From: Ovidiu Chereches Date: Sun, 17 May 2015 14:52:55 +0300 Subject: [PATCH 2/8] Exclude default props from URL #13 --- src/components/component-playground.jsx | 41 ++++++++++++------- .../components/component-playground/render.js | 31 +++++++------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/components/component-playground.jsx b/src/components/component-playground.jsx index 244379f..6440380 100644 --- a/src/components/component-playground.jsx +++ b/src/components/component-playground.jsx @@ -167,11 +167,10 @@ module.exports = React.createClass({ return