File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1- import { Component , HostBinding } from "@angular/core" ;
1+ import { ChangeDetectionStrategy , Component , HostBinding } from "@angular/core" ;
22
33@Component ( {
44 selector : "cds-context-menu-divider, ibm-context-menu-divider" ,
5- template : ""
5+ template : "" ,
6+ changeDetection : ChangeDetectionStrategy . OnPush
67} )
78export class ContextMenuDividerComponent {
89 @HostBinding ( "class.cds--menu-item-divider" ) dividerClass = true ;
Original file line number Diff line number Diff line change 11import {
2+ ChangeDetectionStrategy ,
23 Component ,
34 EventEmitter ,
45 HostBinding ,
@@ -17,7 +18,8 @@ import { ContextMenuSelectionService } from "./context-menu-selection.service";
1718 template : `
1819 <ng-content />
1920 ` ,
20- providers : [ ContextMenuSelectionService ]
21+ providers : [ ContextMenuSelectionService ] ,
22+ changeDetection : ChangeDetectionStrategy . OnPush
2123} )
2224export class ContextMenuGroupComponent implements OnInit , OnChanges , OnDestroy {
2325 @HostBinding ( "attr.role" ) role = "group" ;
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import {
1010 Optional ,
1111 OnInit ,
1212 AfterContentInit ,
13- OnDestroy
13+ OnDestroy ,
14+ ChangeDetectionStrategy
1415} from "@angular/core" ;
1516import { Subscription } from "rxjs" ;
1617import { ContextMenuSelectionService } from "./context-menu-selection.service" ;
@@ -41,7 +42,8 @@ import { ContextMenuComponent } from "./context-menu.component";
4142 :host {
4243 grid-template-columns: 1rem 1fr max-content;
4344 }
44- ` ]
45+ ` ] ,
46+ changeDetection : ChangeDetectionStrategy . OnPush
4547} )
4648export class ContextMenuItemComponent implements OnInit , AfterContentInit , OnDestroy {
4749 @HostBinding ( "class.cds--menu-item" ) optionClass = true ;
Original file line number Diff line number Diff line change 55 Input ,
66 SimpleChanges ,
77 OnChanges ,
8- HostBinding
8+ HostBinding ,
9+ ChangeDetectionStrategy
910} from "@angular/core" ;
1011
1112/**
@@ -26,7 +27,8 @@ import {
2627 :host {
2728 display: block;
2829 }
29- ` ]
30+ ` ] ,
31+ changeDetection : ChangeDetectionStrategy . OnPush
3032} )
3133export class ContextMenuComponent implements OnChanges {
3234 @Input ( ) open = false ;
You can’t perform that action at this time.
0 commit comments