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

observer: true not working for custom element #7598

Comments

@Prinzhorn
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-navigation-forked-hq74dw?file=%2Findex.html%3A56%2C6

Bug description

When deleting a slide the slider does not updated and leaves extra space at the far right. Compare this to the core-api version https://codesandbox.io/p/sandbox/swiper-navigation-forked-2x6fjm?file=%2Findex.html%3A64%2C48

If this is not supported in the custom element, then there should be a warning or error when using the attribute, right? Or maybe there is and I don't see it because I'm using the bundled js?

Expected Behavior

No response

Actual Behavior

No response

Swiper version

swiper@11

Platform/Target and Browser Versions

Ubuntu 23.10 with both Firefox 127.0.2 and Chromium 126.0.6478.114

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@Prinzhorn
Copy link
Author

What's weird is that if you open the sandbox it renders correctly. But if you save it once it will show the described behavior.

The video shows the slider working, then I hit ctrl+s and it breaks. Maybe this is an issue with code sandbox? I've never used this service.

Screencast.from.2024-07-02.08-52-34.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment