diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js index 1c3b43f9db..7ae1bbf988 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js @@ -20,6 +20,11 @@ export default { } }, success: { + on: { + RESET: { + target: 'idle' + } + } }, error: {}, }, diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs index 2d0667a659..a5422d1568 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs @@ -52,7 +52,10 @@ item=@item token=fsm.state.context.PeeringToken regenerate=@regenerate - onclick=(queue (set @item 'Name' '')) + onclick=(queue + (set @item 'Name' '') + (fn fsm.dispatch 'RESET') + ) ) Actions=(component "consul/peer/form/token/actions" token=fsm.state.context.PeeringToken