-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with remove() function #405
Labels
Comments
Good catch! a workaround for now is just to set the the active element again! remove(gallery: GalleryRef) {
gallery.remove(2);
gallery.set(2);
} Here is a working stackblitz |
The workaround is working fine for all the indexes but if we remove last image than the same problem occur😅 |
@jigneshHchauhan In that case, you need to set index of last image - 1
|
Merged
Fixed in v5.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the expected behavior?
What is the current behavior?
Which versions are you using for the following packages?
Angular: "12"
Angular CDK: "12.0.0"
Angular CLI: "12.0.5"
Typescript: "4.2.3"
Gallery: "5.0.0"
` this.gallery.ref("myGallery").load([
new ImageItem({ src: 'antarctica-iceberg-ocean.jpg', thumb: 'antarctica-iceberg-ocean.jpg' }),
new ImageItem({ src: '1945822.jpg', thumb: '1945822.jpg' }),
new ImageItem({ src: 'forest-mountains-sunset-river.jpg', thumb: 'forest-mountains-sunset-river.jpg' })
]);
this.gallery.ref("myGallery").remove(1);
`
The text was updated successfully, but these errors were encountered: