Skip to content

Commit

Permalink
fix(artifact/helm): fix version list (#7030)
Browse files Browse the repository at this point in the history
helm chart versions weren't being listed properly because the chart name
was being pulled from the previous value. so, the list of versions you
got back were for a previously selected chart name instead of the newly
selected chart name.
  • Loading branch information
ethanfrogers committed May 20, 2019
1 parent 3fd183e commit f3fd44c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class HelmEditor extends React.Component<IArtifactEditorProps, IHelmArtifactEdit
value={artifact.name || ''}
onChange={(e: Option) => {
this.onChange(e, 'name');
this.onNameChange();
this.onNameChange(e.value.toString());
}}
clearable={false}
/>
Expand All @@ -80,8 +80,8 @@ class HelmEditor extends React.Component<IArtifactEditorProps, IHelmArtifactEdit
this.props.onChange(clone);
};

private onNameChange = () => {
ArtifactService.getArtifactVersions(TYPE, this.props.account.name, this.props.artifact.name).then(versions => {
private onNameChange = (chartName: string) => {
ArtifactService.getArtifactVersions(TYPE, this.props.account.name, chartName).then(versions => {
this.setState({ versions });
});
};
Expand Down

0 comments on commit f3fd44c

Please sign in to comment.