ng-image-slider
ng-image-slider copied to clipboard
Disabled state of navigation buttons in lightbox not updating correctly when parent component uses ChangeDetectionStrategy.OnPush
When the parent component uses ChangeDetectionStrategy.OnPush, the disabled state of the prev and next buttons in the lightbox isn't set correctly after the animation is done. They stay disabled, because of a missing change detection run.
Here's a demo (it's the same that I used in #80): https://stackblitz.com/edit/ng-image-slider-demo-qupet5?file=src/app/slider/slider.component.ts
Similar to issue #80, I hope a this.cdRef.detectChanges() in nextPrevDisable() would fix this: https://github.com/sanjayV/ng-image-slider/blob/master/projects/ng-image-slider/src/lib/slider-lightbox/slider-lightbox.component.ts#L170