From 7b5a5949a1484d388caca632247009972fabd46d Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 11 Jan 2018 16:52:03 -0600 Subject: [PATCH] fix(core-components): make `onToggle` a non-required prop in ModelCollapse --- src/core/components/model-collapse.jsx | 5 +++-- src/core/components/object-model.jsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/components/model-collapse.jsx b/src/core/components/model-collapse.jsx index d501d4b10c9..528ec09d0e0 100644 --- a/src/core/components/model-collapse.jsx +++ b/src/core/components/model-collapse.jsx @@ -8,13 +8,14 @@ export default class ModelCollapse extends Component { children: PropTypes.any, title: PropTypes.element, modelName: PropTypes.string, - onToggle: PropTypes.func.isRequired + onToggle: PropTypes.func } static defaultProps = { collapsedContent: "{...}", expanded: false, - title: null + title: null, + onToggle: () => {} } constructor(props, context) { diff --git a/src/core/components/object-model.jsx b/src/core/components/object-model.jsx index fb77f56036c..312412cbfe8 100644 --- a/src/core/components/object-model.jsx +++ b/src/core/components/object-model.jsx @@ -12,7 +12,7 @@ export default class ObjectModel extends Component { getComponent: PropTypes.func.isRequired, getConfigs: PropTypes.func.isRequired, expanded: PropTypes.bool, - onToggle: PropTypes.func.isRequired, + onToggle: PropTypes.func, specSelectors: PropTypes.object.isRequired, name: PropTypes.string, isRef: PropTypes.bool,