commit
e650c31b11
|
@ -73,7 +73,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange
|
|||
ngOnInit(): void {
|
||||
// Initialize values.
|
||||
this.priority = this.priority || 1;
|
||||
this.hasAction = !!this.action && this.action.observers.length > 0;
|
||||
this.hasAction = !!this.action && this.action.observed;
|
||||
this.ariaAction = this.ariaAction || this.content;
|
||||
|
||||
if (this.hasAction) {
|
||||
|
|
|
@ -61,7 +61,7 @@ export class CoreContextMenuPopoverComponent {
|
|||
item.toggle = !item.toggle;
|
||||
}
|
||||
|
||||
if (!!item.action && item.action.observers.length > 0) {
|
||||
if (!!item.action && item.action.observed) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
|
@ -74,7 +74,7 @@ export class CoreContextMenuPopoverComponent {
|
|||
}
|
||||
|
||||
item.action.emit(() => this.closeMenu(item));
|
||||
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observers.length > 0))) {
|
||||
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observed))) {
|
||||
this.closeMenu(item);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ export class CoreLocalFileComponent implements OnInit {
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observers.length) {
|
||||
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observed) {
|
||||
this.onClick.emit();
|
||||
|
||||
return;
|
||||
|
|
|
@ -306,7 +306,7 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.onClick.observers.length > 0) {
|
||||
if (this.onClick.observed) {
|
||||
this.onClick.emit();
|
||||
|
||||
return;
|
||||
|
|
|
@ -54,7 +54,7 @@ export class CoreSupressEventsDirective implements OnInit {
|
|||
* Initialize event listeners.
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
if (this.onClick.observers.length == 0) {
|
||||
if (!this.onClick.observed) {
|
||||
CoreLogger.getInstance('CoreSupressEventsDirective')
|
||||
.error('No onClick output was defined causing this directive to fail', this.element);
|
||||
|
||||
|
|
Loading…
Reference in New Issue