Use onpush strategy for dropdown

This commit is contained in:
Chocobozzz 2022-10-25 14:42:18 +02:00
parent aa887096f9
commit 34ba86a8b4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import { Component, Input } from '@angular/core'
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { Params } from '@angular/router'
import { GlobalIconName } from '@app/shared/shared-icons'
@ -25,7 +25,8 @@ export type DropdownDirection = 'horizontal' | 'vertical'
@Component({
selector: 'my-action-dropdown',
styleUrls: [ './action-dropdown.component.scss' ],
templateUrl: './action-dropdown.component.html'
templateUrl: './action-dropdown.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ActionDropdownComponent<T> {

View File

@ -1,10 +1,11 @@
import { Component, Input, OnChanges } from '@angular/core'
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'
import { GlobalIconName } from '@app/shared/shared-icons'
@Component({
selector: 'my-button',
styleUrls: [ './button.component.scss' ],
templateUrl: './button.component.html'
templateUrl: './button.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ButtonComponent implements OnChanges {