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

Commit 24641e0

Browse files
authored
Merge pull request #1070 from replicatedhq/ship-config-renderer-to-emit-data-changes
Ship config renderer to emit data changes
2 parents 0d5af63 + 4d34c86 commit 24641e0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: web/init/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@replicatedhq/ship-init",
3-
"version": "1.6.7",
3+
"version": "1.6.8",
44
"description": "Shared component that contains the Ship Init app",
55
"author": "Replicated, Inc.",
66
"license": "Apache-2.0",

Diff for: web/init/src/ShipConfigRenderer.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import "./scss/index.scss";
99

1010
export class ShipConfigRenderer extends React.Component {
1111
static propTypes = {
12-
/** Config groups itesms to render */
13-
groups: PropTypes.array.isRequired,
12+
groups: PropTypes.array.isRequired, // Config groups items to render
13+
handleChange: PropTypes.func,
14+
getData: PropTypes.func,
1415
}
1516

1617
static defaultProps = {
@@ -32,8 +33,7 @@ export class ShipConfigRenderer extends React.Component {
3233
<ConfigRender
3334
fieldsList={groupsList}
3435
fields={_groups}
35-
handleChange={() => { return; }}
36-
getData={() => { return; }}
36+
handleChange={this.props.handleChange}
3737
/>
3838
</div>
3939
)

Diff for: web/init/src/components/config_render/ConfigRender.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class ConfigRender extends React.Component {
7979
this.setState({groups: keyBy(groups, "name")});
8080

8181
// TODO: maybe this should only be on submit
82-
this.triggerChange(this.props.getData(groups));
82+
this.triggerChange(groups);
8383
}
8484

8585
componentDidUpdate(lastProps) {

0 commit comments

Comments
 (0)