From eb5512fb74781ea49be743e2f0f16b3f1863ef61 Mon Sep 17 00:00:00 2001 From: Kenia <19161242+kaxcode@users.noreply.github.com> Date: Tue, 27 Jul 2021 17:34:11 -0400 Subject: [PATCH] ui: Fix dropdown option duplications (#10706) --- .changelog/10706.txt | 3 +++ .../app/components/consul/intention/form/fieldsets/index.hbs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changelog/10706.txt diff --git a/.changelog/10706.txt b/.changelog/10706.txt new file mode 100644 index 0000000000..350abe5a7b --- /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 e19be3d500..d08a786c7d 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}}