Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1070 from replicatedhq/ship-config-renderer-to-em…
Browse files Browse the repository at this point in the history
…it-data-changes

Ship config renderer to emit data changes
  • Loading branch information
sgalsaleh committed Sep 25, 2019
2 parents 0d5af63 + 4d34c86 commit 24641e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion web/init/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions web/init/src/ShipConfigRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -32,8 +33,7 @@ export class ShipConfigRenderer extends React.Component {
<ConfigRender
fieldsList={groupsList}
fields={_groups}
handleChange={() => { return; }}
getData={() => { return; }}
handleChange={this.props.handleChange}
/>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion web/init/src/components/config_render/ConfigRender.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 24641e0

Please sign in to comment.