perf: add OnPush change detection to components

- Add OnPush to ConfigSoundFormComponent
- Add OnPush to TaskViewCustomizerPanelComponent
- Improves change detection performance for these components
This commit is contained in:
Johannes Millan 2025-06-17 23:17:39 +02:00
parent 49dc92d588
commit 4e235efb3f
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
import { Component, Input, output } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, output } from '@angular/core';
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { GlobalConfigSectionKey, SoundConfig } from '../global-config.model';
import { ProjectCfgFormKey } from '../../project/project.model';
@ -23,6 +23,7 @@ const sectionKey = 'sound';
selector: 'config-sound-form',
templateUrl: './config-sound-form.component.html',
styleUrls: ['./config-sound-form.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
CollapsibleComponent,
FormsModule,

View file

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
@ -15,6 +15,7 @@ import { T } from 'src/app/t.const';
selector: 'task-view-customizer-panel',
templateUrl: './task-view-customizer-panel.component.html',
styleUrls: ['./task-view-customizer-panel.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
CommonModule,