mirror of https://github.com/Chocobozzz/PeerTube
Use onpush strategy for dropdown
parent
aa887096f9
commit
34ba86a8b4
|
@ -1,4 +1,4 @@
|
||||||
import { Component, Input } from '@angular/core'
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
||||||
import { Params } from '@angular/router'
|
import { Params } from '@angular/router'
|
||||||
import { GlobalIconName } from '@app/shared/shared-icons'
|
import { GlobalIconName } from '@app/shared/shared-icons'
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@ export type DropdownDirection = 'horizontal' | 'vertical'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-action-dropdown',
|
selector: 'my-action-dropdown',
|
||||||
styleUrls: [ './action-dropdown.component.scss' ],
|
styleUrls: [ './action-dropdown.component.scss' ],
|
||||||
templateUrl: './action-dropdown.component.html'
|
templateUrl: './action-dropdown.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ActionDropdownComponent<T> {
|
export class ActionDropdownComponent<T> {
|
||||||
|
|
|
@ -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'
|
import { GlobalIconName } from '@app/shared/shared-icons'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-button',
|
selector: 'my-button',
|
||||||
styleUrls: [ './button.component.scss' ],
|
styleUrls: [ './button.component.scss' ],
|
||||||
templateUrl: './button.component.html'
|
templateUrl: './button.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ButtonComponent implements OnChanges {
|
export class ButtonComponent implements OnChanges {
|
||||||
|
|
Loading…
Reference in New Issue