Skip to content
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

Error when using moveTo method: "Index '0' is out of range" #889

Open
yeonjaee opened this issue Sep 2, 2024 · 2 comments
Open

Error when using moveTo method: "Index '0' is out of range" #889

yeonjaee opened this issue Sep 2, 2024 · 2 comments
Assignees
Labels
🔖4.x v4.x~ related issue 📦Angular @egjs/ngx-flicking related issue ❓Question Asking question about @egjs/Flicking

Comments

@yeonjaee
Copy link

yeonjaee commented Sep 2, 2024

Description

When using the moveTo method in ngx-flicking to move to a panel at a given index, an error occurs. The method is called with the index of the panel as its argument, but the following error message is thrown:

Error: Uncaught (in promise): FlickingError: Index "0" is out of range: should be between 0 and -1.
FlickingError: Index "0" is out of range: should be between 0 and -1. at new FlickingError (FlickingError.ts:34:5)

The NgxFlickingComponent is properly initialized, and the indexes of the flicking-panels are being passed correctly. It works as expected, but an error message is still occurring.

Steps to check or reproduce

https://stackblitz.com/edit/stackblitz-starters-edv3e7?file=src%2Fmain.ts

Here is the link. Please check the error messages logged in the devTools console.

Thank you.

@malangfox
Copy link
Contributor

Hello @yeonjaee.

When we checked the demo using moveTo in ngAfterViewInit, the issue you left did not reproduce properly.
Can we check a demo or repository that reproduces the issue you left?

@malangfox malangfox self-assigned this Sep 4, 2024
@malangfox malangfox added ❓Question Asking question about @egjs/Flicking 📦Angular @egjs/ngx-flicking related issue 🔖4.x v4.x~ related issue labels Sep 4, 2024
@yeonjaee
Copy link
Author

yeonjaee commented Sep 10, 2024

Hello @malangfox.

https://stackblitz.com/edit/stackblitz-starters-edv3e7?file=src%2Fmain.ts

Here is the link. Please check the error messages logged in the devTools console.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖4.x v4.x~ related issue 📦Angular @egjs/ngx-flicking related issue ❓Question Asking question about @egjs/Flicking
Projects
None yet
Development

No branches or pull requests

2 participants