Skip to content

Commit

Permalink
feat(docker): clarify searchability of docker tags on manual execution (
Browse files Browse the repository at this point in the history
#8147)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
maggieneterval and mergify[bot] committed Apr 8, 2020
1 parent cc1af95 commit 1dffe57
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export class DockerTriggerTemplate extends React.Component<
const { command } = this.props;
const trigger = command.trigger as IDockerTrigger;
const newState = {} as IDockerTriggerTemplateState;
newState.tags = tags;
if (newState.tags.length) {
// default to what is supplied by the trigger if possible; otherwise, use the latest
const defaultSelection = newState.tags.find(t => t === trigger.tag) || newState.tags[0];
newState.tags = tags || [];
// default to what is supplied by the trigger if possible
const defaultSelection = newState.tags.find(t => t === trigger.tag);
if (defaultSelection) {
newState.selectedTag = defaultSelection;
this.updateSelectedTag(defaultSelection);
}
Expand Down Expand Up @@ -223,6 +223,7 @@ export class DockerTriggerTemplate extends React.Component<
</span>
)}
onChange={(o: Option<string>) => this.updateSelectedTag(o.value)}
placeholder="Search tags..."
/>
)}
</div>
Expand Down

1 comment on commit 1dffe57

@TheSpy
Copy link

@TheSpy TheSpy commented on 1dffe57 May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change introduced? Newest tag in a dropdown list is not selected anymore

Please sign in to comment.