-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use @ViewSelectSnapshot multiple times in one Component #102
Comments
I'm having this problem as well. |
@arturovt what do you think about this? |
I will have a look when I have some time. |
I wasn't able to reproduce it. Please provide a minimal reproducible example. |
I've published |
@arturovt thank you. I'll give it a try. |
Thanks. I check it in my project. It seams it is working. I am watching on it the next time and give feedback again later. |
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:
The text was updated successfully, but these errors were encountered: