We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
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
Sorry, something went wrong.
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
remove(gallery: GalleryRef) { gallery.remove(3); // last image index gallery.set(2); }
Fixed in v5.1.1
Successfully merging a pull request may close this issue.
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: