You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Support request => Please do not submit support request here
Current behavior
These components current are barely reactive, so some components won't work well if used by parent/root components which marked ChangeDetectionStrategy.OnPush, unless mark changes manually.
Expected behavior
Components work well even if they're under ChangeDetectionStrategy.OnPush scene.
Minimal reproduction of the problem with instructions
Create a component with ChangeDetectionStrategy.OnPush
What is the motivation / use case for changing the behavior?
Environment
Angular version: X.Y.Z
ng-zorro-antd version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
For everyone who uses OnPush mode, they must add ref.markForCheck() to every logic which should update components' data, or turn to use Default mode.
Use rxjs/Observable could solve this problem, But i don't know whether it will lead to more complex problems, I've not tested for ng-zorro yet.
But i think it would not break the current component structure - it is only need to change the middle layer data to observable, like the nzVisible property in NzPopconfirmComponent, the other Input properties will not be changes.
Anyway thanks for your nice work, i really like those components and theirs style.
The text was updated successfully, but these errors were encountered:
Yes, onPush is not supported yet, and I can't make a promise when it will be supported at this moment.
The most important thing is ensuring all bugs to be fixed until 0.5.0 final version release.
It needs a lot of work to support onPush since that all components need to be tested, and some strategies need to be rewrite.
welcome pr for this, and thanks very much for your feedback.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
lockbot
locked as resolved and limited conversation to collaborators
Feb 19, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a...
Current behavior
These components current are barely reactive, so some components won't work well if used by parent/root components which marked
ChangeDetectionStrategy.OnPush
, unless mark changes manually.Expected behavior
Components work well even if they're under
ChangeDetectionStrategy.OnPush
scene.Minimal reproduction of the problem with instructions
<nz-popconfirm>
to the componentWhat is the motivation / use case for changing the behavior?
Environment
I've noticed that comment #74 (comment)
For everyone who uses OnPush mode, they must add
ref.markForCheck()
to every logic which should update components' data, or turn to use Default mode.Use rxjs/Observable could solve this problem, But i don't know whether it will lead to more complex problems, I've not tested for ng-zorro yet.
But i think it would not break the current component structure - it is only need to change the middle layer data to observable, like the
nzVisible
property inNzPopconfirmComponent
, the other Input properties will not be changes.Anyway thanks for your nice work, i really like those components and theirs style.
The text was updated successfully, but these errors were encountered: