fix(module: select): multiple select cause switch size flash when init - #8851
Conversation
|
This preview will be available after the AzureCI is passed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8851 +/- ##
==========================================
- Coverage 91.94% 91.93% -0.01%
==========================================
Files 537 537
Lines 18455 18458 +3
Branches 2816 2816
==========================================
+ Hits 16968 16970 +2
- Misses 1183 1184 +1
Partials 304 304 ☔ View full report in Codecov by Sentry. |
Laffery
left a comment
There was a problem hiding this comment.
Hi there 👋, thanks for your first contribution to ng-zorro !
What about wrapping the regAnimFrame in the syncMirrorWidth method instead?
syncMirrorWidth(): void {
reqAnimFrame(() => {
// ...
});
}|
Further more, even though we have encapsulated the |
Thank you for your suggestion. Obviously, this is a more elegant way of coding. I have made the necessary modifications, thanks very much ! @Laffery |
I'm willing and will try my best to do that 🤝 |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: Close #8847
What is the new behavior?
当 select 的 nzMode 设为 multiple 或 tags 且 switch 的 nzSize 设为 small 时,switch 组件初始化时不再出现大小闪烁现象(由 default 变为 small)
When nzMode of select is multiple or tags, and nzSize of switch is small, the size flashing (change from default to small) of switch no longer occurs at initialization.
Does this PR introduce a breaking change?
Other information