diff --git a/.changelog/10706.txt b/.changelog/10706.txt new file mode 100644 index 000000000..350abe5a7 --- /dev/null +++ b/.changelog/10706.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix dropdown option duplication in the new intentions form +``` \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs index e19be3d50..d08a786c7 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs @@ -39,7 +39,7 @@ @buildSuggestion={{action "createNewLabel" "Use a Consul Namespace called '{{term}}'"}} @showCreateWhen={{action "isUnique" nspaces}} @onCreate={{action onchange "SourceNS"}} - @onChange={{action onchange "SourceNS"}} as |nspace|> + @onChange={{fn (mut this.SourceNS)}} as |nspace|> {{#if (eq nspace.Name '*') }} * (All Namespaces) {{else}} @@ -88,7 +88,7 @@ @buildSuggestion={{action "createNewLabel" "Use a future Consul Namespace called '{{term}}'"}} @showCreateWhen={{action "isUnique" nspaces}} @onCreate={{action onchange "DestinationNS"}} - @onChange={{action onchange "DestinationNS"}} as |nspace|> + @onChange={{fn (mut this.DestinationNS)}} as |nspace|> {{#if (eq nspace.Name '*') }} * (All Namespaces) {{else}}