mirror of https://github.com/status-im/consul.git
ui: Fix sticky action popover menus (#8326)
* ui Close more-popover-menus in KV and nspaces on confirmation * ui: Close more-popovermenus on confirmation on composite-rows
This commit is contained in:
parent
3820dca426
commit
24b87b81d5
|
@ -7,7 +7,7 @@
|
|||
<div role="menu">
|
||||
<YieldSlot @name="confirmation" @params={{
|
||||
block-params (component 'confirmation-alert'
|
||||
onclick=(action onclick)
|
||||
onclick=(queue (action onclick) (action menu.clickTrigger))
|
||||
name=(concat menu.confirm guid)
|
||||
)
|
||||
}}>{{yield}}</YieldSlot>
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
<BlockSlot @name="trigger">
|
||||
More
|
||||
</BlockSlot>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||
{{yield (component 'more-popover-menu/action' menu=(hash
|
||||
addSubmenu=api.addSubmenu
|
||||
removeSubmenu=api.removeSubmenu
|
||||
confirm=confirm
|
||||
keypressClick=keypressClick
|
||||
clickTrigger=clickTrigger
|
||||
))}}
|
||||
</BlockSlot>
|
||||
</PopoverMenu>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<BlockSlot @name="trigger">
|
||||
More
|
||||
</BlockSlot>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||
<li role="none">
|
||||
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to (if item.isFolder 'dc.kv.folder' 'dc.kv.edit') item.Key}}>{{if item.isFolder 'View' 'Edit'}}</a>
|
||||
</li>
|
||||
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
<ul>
|
||||
<li class="dangerous">
|
||||
<button tabindex="-1" type="button" class="type-delete" onclick={{action send 'delete' item}}>Delete</button>
|
||||
<button tabindex="-1" type="button" class="type-delete" onclick={{queue (action send 'delete' item) (action clickTrigger)}}>Delete</button>
|
||||
</li>
|
||||
<li>
|
||||
<label for={{confirm}}>Cancel</label>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<BlockSlot @name="trigger">
|
||||
More
|
||||
</BlockSlot>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
||||
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||
<li role="none">
|
||||
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
||||
</li>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</div>
|
||||
<ul>
|
||||
<li class="dangerous">
|
||||
<button tabindex="-1" type="button" class="type-delete" onclick={{action send 'delete' item}}>Delete</button>
|
||||
<button tabindex="-1" type="button" class="type-delete" onclick={{queue (action send 'delete' item) (queue clickTrigger)}}>Delete</button>
|
||||
</li>
|
||||
<li>
|
||||
<label for={{confirm}}>Cancel</label>
|
||||
|
|
Loading…
Reference in New Issue