From 34ba86a8b481e0071c5253fcd562911a48688352 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 25 Oct 2022 14:42:18 +0200 Subject: Use onpush strategy for dropdown --- .../src/app/shared/shared-main/buttons/action-dropdown.component.ts | 5 +++-- client/src/app/shared/shared-main/buttons/button.component.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'client/src/app/shared/shared-main/buttons') diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts index e6164fced..e39fbd66d 100644 --- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts +++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts @@ -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 { diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts index 10d67831f..1761938ee 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.ts +++ b/client/src/app/shared/shared-main/buttons/button.component.ts @@ -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 { -- cgit v1.2.3