owl-items disappear [ removed from dom ] on window size change
See original GitHub issueI was facing this issue only in one of my owl carousels, every time I changed the window size the owl-items get removed.
<ng-template carouselSlide [id]="index">
when I removed the [id] they stooped disappearing, also when I removed responsive option the bug didn’t happen again.
Although there were no errors on my console.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Why owl-carousel change items width automatically when the ...
It works for my default window width. However , when I resize my page it automatically change owl-item width. (I found out that...
Read more >Re-render a React Component on Window Resize | Pluralsight
This code will simply listen for the window resize event and console ... React will re-render a component when its props or state...
Read more >The CSS first-of-type and last-of-type are not updating ... - Quora
The CSS first-of-type and last-of-type are not updating when the number of owl-items are decreased by window size. What is the best way...
Read more >Window: resize event - Web APIs | MDN
The resize event fires when the document view (window) has been resized. This event is not cancelable and does not bubble.
Read more >Menu disappears when resizing window - CSS-Tricks
But when the window resizes, it just vanishes when it can no longer fit on screen. Removing the 100% height of the logo...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting the issue with SSR. The problem is solved in new version
v1.0.5
. Install it and SSR should work correctly.You can solve by this way:
display
must be the prop of .ts file.However, this solution will rerender carousel any time after css-prop
display
of<div>
will change fromnone
toblock
.Also carousel can be rerendered after change of length of the array containing data for slides. At the begining you can define this array as empty array and when
display
fromnone
becomesblock
for the first time, you populate the array with data and carousel gets rendered correctly.