fix(carousel): improve slide fallback logic and trigger change detection when collection is changing#17448
Open
mddragnev wants to merge 3 commits into
Open
fix(carousel): improve slide fallback logic and trigger change detection when collection is changing#17448mddragnev wants to merge 3 commits into
mddragnev wants to merge 3 commits into
Conversation
…ion when changing collections
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses the zoneless change-detection scenario for IgxCarouselComponent when slides are changed at runtime (issue #17439), ensuring slide selection and rendering update without requiring user interaction (e.g., hover) to trigger refresh.
Changes:
- Updates carousel slide-differ logic to avoid overwriting
currentItemwhen a better active slide has already been determined during a collection refresh. - Marks the carousel view for check after slide-selection updates scheduled via
requestAnimationFrame, improving zoneless refresh behavior. - Adds a new zoneless-focused test suite covering dynamic slide replacement behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| projects/igniteui-angular/carousel/src/carousel/carousel.component.ts | Adjusts slide removal fallback logic and explicitly markForCheck() after selection updates to support zoneless refresh. |
| projects/igniteui-angular/carousel/src/carousel/carousel.component.spec.ts | Adds zoneless tests for dynamic slide replacement and related activation behavior. |
…pdate slide activation test description
rkaraivanov
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17439
Description
Motivation / Context
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)