From 35ccd2183a1c087a715de65b592e3e0f05d823ee Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Wed, 25 Sep 2019 20:49:49 +0000 Subject: [PATCH 1/2] Modify ShipConfigRenderer to emit data changes --- web/init/src/ShipConfigRenderer.jsx | 8 ++++---- web/init/src/components/config_render/ConfigRender.jsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/init/src/ShipConfigRenderer.jsx b/web/init/src/ShipConfigRenderer.jsx index 6a01e6b45..cdbcfc64e 100644 --- a/web/init/src/ShipConfigRenderer.jsx +++ b/web/init/src/ShipConfigRenderer.jsx @@ -9,8 +9,9 @@ import "./scss/index.scss"; export class ShipConfigRenderer extends React.Component { static propTypes = { - /** Config groups itesms to render */ - groups: PropTypes.array.isRequired, + groups: PropTypes.array.isRequired, // Config groups items to render + handleChange: PropTypes.func, + getData: PropTypes.func, } static defaultProps = { @@ -32,8 +33,7 @@ export class ShipConfigRenderer extends React.Component { { return; }} - getData={() => { return; }} + handleChange={this.props.handleChange} /> ) diff --git a/web/init/src/components/config_render/ConfigRender.jsx b/web/init/src/components/config_render/ConfigRender.jsx index 7c8092885..7f68dbe34 100644 --- a/web/init/src/components/config_render/ConfigRender.jsx +++ b/web/init/src/components/config_render/ConfigRender.jsx @@ -79,7 +79,7 @@ export default class ConfigRender extends React.Component { this.setState({groups: keyBy(groups, "name")}); // TODO: maybe this should only be on submit - this.triggerChange(this.props.getData(groups)); + this.triggerChange(groups); } componentDidUpdate(lastProps) { From 4d34c8648d44b5cd75ef4b0474fc5e1adaca14ff Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Wed, 25 Sep 2019 20:50:48 +0000 Subject: [PATCH 2/2] bump the version number --- web/init/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/init/package.json b/web/init/package.json index de0d20b38..abc05c75e 100644 --- a/web/init/package.json +++ b/web/init/package.json @@ -1,6 +1,6 @@ { "name": "@replicatedhq/ship-init", - "version": "1.6.7", + "version": "1.6.8", "description": "Shared component that contains the Ship Init app", "author": "Replicated, Inc.", "license": "Apache-2.0",