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">
|
<div role="menu">
|
||||||
<YieldSlot @name="confirmation" @params={{
|
<YieldSlot @name="confirmation" @params={{
|
||||||
block-params (component 'confirmation-alert'
|
block-params (component 'confirmation-alert'
|
||||||
onclick=(action onclick)
|
onclick=(queue (action onclick) (action menu.clickTrigger))
|
||||||
name=(concat menu.confirm guid)
|
name=(concat menu.confirm guid)
|
||||||
)
|
)
|
||||||
}}>{{yield}}</YieldSlot>
|
}}>{{yield}}</YieldSlot>
|
||||||
|
|
|
@ -3,12 +3,13 @@
|
||||||
<BlockSlot @name="trigger">
|
<BlockSlot @name="trigger">
|
||||||
More
|
More
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||||
{{yield (component 'more-popover-menu/action' menu=(hash
|
{{yield (component 'more-popover-menu/action' menu=(hash
|
||||||
addSubmenu=api.addSubmenu
|
addSubmenu=api.addSubmenu
|
||||||
removeSubmenu=api.removeSubmenu
|
removeSubmenu=api.removeSubmenu
|
||||||
confirm=confirm
|
confirm=confirm
|
||||||
keypressClick=keypressClick
|
keypressClick=keypressClick
|
||||||
|
clickTrigger=clickTrigger
|
||||||
))}}
|
))}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
</PopoverMenu>
|
</PopoverMenu>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<BlockSlot @name="trigger">
|
<BlockSlot @name="trigger">
|
||||||
More
|
More
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||||
<li role="none">
|
<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>
|
<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>
|
</li>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="dangerous">
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<label for={{confirm}}>Cancel</label>
|
<label for={{confirm}}>Cancel</label>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<BlockSlot @name="trigger">
|
<BlockSlot @name="trigger">
|
||||||
More
|
More
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="menu" as |confirm send keypressClick|>
|
<BlockSlot @name="menu" as |confirm send keypressClick clickTrigger|>
|
||||||
<li role="none">
|
<li role="none">
|
||||||
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="dangerous">
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<label for={{confirm}}>Cancel</label>
|
<label for={{confirm}}>Cancel</label>
|
||||||
|
|
Loading…
Reference in New Issue