Skip to content

Commit

Permalink
* popover: fix commands proxy not work from popovers.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Oct 13, 2024
1 parent b4ac7cf commit 321bd70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/popover/src/vanilla/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class Popover<O extends PopoverOptions = PopoverOptions, E extends Compon
}

if (!this._virtual) {
$target.attr('zui-command-proxy', '').data('zui.commandProxy', this._triggerElement);
$target.attr('zui-commands-proxy', '').data('zui.commandProxy', this._triggerElement);
if (elementShowClass) {
$(this._triggerElement as HTMLElement).addClass(elementShowClass);
}
Expand Down Expand Up @@ -267,7 +267,7 @@ export class Popover<O extends PopoverOptions = PopoverOptions, E extends Compon

if (!this._virtual) {
const $trigger = $(this._triggerElement as HTMLElement);
$trigger.removeAttr('zui-command-proxy').removeData('zui.commandProxy');
$trigger.removeAttr('zui-commands-proxy').removeData('zui.commandProxy');
if (elementShowClass) {
$trigger.removeClass(elementShowClass).removeAttr('data-pop-placement');
}
Expand Down

0 comments on commit 321bd70

Please sign in to comment.