If I use @ViewSelectSnapshot in one Component multiple times like:
@component({
selector: 'app-progress',
template: <div> <div> <span>progress1</span> </div> <div> <span>progress2</span> </div> </div>,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProgressComponent {
@ViewSelectSnapshot(ProgressState.getProgress1) progress1: number;
@ViewSelectSnapshot(ProgressState.getProgress2) progress2: number;
}
MarkForCheck is only executed if progress2 is changed in the state. If progress1 is changed no markforcheck is executed.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:
Libs:
- @angular/core version: 11.2.0
- @ngxs/store version: 3.7.1
Browser:
If I use @ViewSelectSnapshot in one Component multiple times like:
@component({
selector: 'app-progress',
template:
<div> <div> <span>progress1</span> </div> <div> <span>progress2</span> </div> </div>,changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProgressComponent {
@ViewSelectSnapshot(ProgressState.getProgress1) progress1: number;
@ViewSelectSnapshot(ProgressState.getProgress2) progress2: number;
}
MarkForCheck is only executed if progress2 is changed in the state. If progress1 is changed no markforcheck is executed.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:
Libs:
Browser: