From f7f63812244a2e7a37cfd63c1835be86a5c787ae 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 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}}