From 0afb8a1074954a2c319db14f62a98c2992367139 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 24 Mar 2020 10:55:45 +0000 Subject: [PATCH] ui: Exposes the 'click' action (#7479) This exposes an api for so you can call it from elsewhere, specifically here we use the api.click to close the dropdown menus which is required is the DOM containing the toggle button isn't redrawn as is the case with external links in a dropdown menu --- .../app/components/hashicorp-consul/index.hbs | 8 +-- ui-v2/app/components/popover-menu/index.hbs | 10 ++-- ui-v2/app/components/toggle-button/README.mdx | 54 +++++++++++++++++++ ui-v2/app/components/toggle-button/index.hbs | 13 ++++- ui-v2/app/components/toggle-button/index.js | 49 +++++++++-------- 5 files changed, 103 insertions(+), 31 deletions(-) create mode 100644 ui-v2/app/components/toggle-button/README.mdx diff --git a/ui-v2/app/components/hashicorp-consul/index.hbs b/ui-v2/app/components/hashicorp-consul/index.hbs index 3b885cf8af..642c63ffea 100644 --- a/ui-v2/app/components/hashicorp-consul/index.hbs +++ b/ui-v2/app/components/hashicorp-consul/index.hbs @@ -94,16 +94,16 @@ Help - +
  • diff --git a/ui-v2/app/components/popover-menu/index.hbs b/ui-v2/app/components/popover-menu/index.hbs index 19096b431a..3552845d00 100644 --- a/ui-v2/app/components/popover-menu/index.hbs +++ b/ui-v2/app/components/popover-menu/index.hbs @@ -1,7 +1,11 @@ {{yield (concat 'popover-menu-' guid)}} - -