Skip to content

Commit

Permalink
fix(core): fix state update for pipeline tags (#9163) (#9164)
Browse files Browse the repository at this point in the history
* fix(core): fix state update for pipeline tags

* fix(core): make metadata page content overridable

(cherry picked from commit 31e8303)

Co-authored-by: Fernando Freire <fernando.freire@armory.io>
  • Loading branch information
mergify[bot] and dogonthehorizon committed May 13, 2021
1 parent 6b64ae9 commit 5570a0c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';

import { IPipeline, IPipelineTag } from 'core/domain';
import { HelpField } from 'core/help';
import { IOverridableProps, overridableComponent } from 'core/overrideRegistry';
import {
createFakeReactSyntheticEvent,
FormField,
Expand Down Expand Up @@ -98,7 +99,7 @@ function TagsInput({ name, onChange, value, validation }: ITagsInput) {
);
}

export function MetadataPageContent(props: IMetadataPageContentProps) {
export function MetadataPage(props: IMetadataPageContentProps) {
const { pipeline, updatePipelineConfig } = props;

return (
Expand All @@ -122,10 +123,15 @@ export function MetadataPageContent(props: IMetadataPageContentProps) {
name="tags"
label="Tags"
value={pipeline.tags}
onChange={(e) => updatePipelineConfig({ description: e.target.value })}
onChange={(e) => updatePipelineConfig({ tags: e.target.value })}
help={<HelpField id="pipeline.config.tags" />}
input={(inputProps) => <TagsInput {...inputProps} />}
/>
</>
);
}

export const MetadataPageContent = overridableComponent<
IMetadataPageContentProps & IOverridableProps,
typeof MetadataPage
>(MetadataPage, 'metadataPageContent');

0 comments on commit 5570a0c

Please sign in to comment.