Skip to content

Commit

Permalink
fix(core/pipeline): Refresh jenkins jobs component when manual execut…
Browse files Browse the repository at this point in the history
…ion trigger is changed (spinnaker#7323)

In Manual Execution dialog, we have a dropdown that selects the correct trigger
When the user changes the selected trigger, we now force the trigger's custom component to remount.
This is a kludge and some day we should remove it.
Instead, all the trigger type components should properly respond to changes in the props passed to it.
  • Loading branch information
christopherthielen committed Aug 14, 2019
1 parent 1251159 commit 0fbafe6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ export class Triggers extends React.Component<ITriggersProps> {

{triggerComponent && (
<div className={'trigger-template'}>
<TriggerTemplate updateCommand={this.updateCommand} component={triggerComponent} command={formik.values} />
<TriggerTemplate
key={formik.values.trigger.description}
updateCommand={this.updateCommand}
component={triggerComponent}
command={formik.values}
/>
</div>
)}
</div>
Expand Down

0 comments on commit 0fbafe6

Please sign in to comment.