NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.84k stars 3.9k forks source link

Issue with Carousel #5051

Open Ivan-Navalotski opened 4 years ago

Ivan-Navalotski commented 4 years ago

Reproduction link

https://stackblitz.com/edit/angular-o811ti

Steps to reproduce

If i have collapsable menu and carousel in content layout then carousel don't change width when i open/close menu.

What is expected?

carousel change width adaptive

What is actually happening?

carousel don't change width adaptive

Environment Info
ng-zorro-antd 9.0.0
Browser Chrome 81.0.4044.113
wzhudev commented 4 years ago

For performance reason, carousel will not re-calculate its layout autometically. You can add a public method on the NzCascaderComponent to manually trigger re-calculation (or, let the component listen to the resize event of div.slick-slider perhaps?). As a temporary fix, you could dispatch a resize event to window to trigger re-calculation.

zorro-bot[bot] commented 4 years ago

Hello @Ivan-Navolotski. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please fill the Pull Request Template here, provide documentation/test cases if needed and make sure CI passed, we will review it soon. Appreciate it advance and we are looking forward to your contribution!

你好 @Ivan-Navolotski, 我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献! giphy