Correct names for swiper element events use "swiper-" prefix#3370
Closed
arnotixe wants to merge 1 commit intoionic-team:mainfrom
Closed
Correct names for swiper element events use "swiper-" prefix#3370arnotixe wants to merge 1 commit intoionic-team:mainfrom
arnotixe wants to merge 1 commit intoionic-team:mainfrom
Conversation
on ionic 7.5.5, swiper 11.0.4 the table above should probably be rewritten to have the prefix "swiper" to all the events. event called "init" in table -> swiperinit and so on for all events. There are forum answers putting us on this track https://forum.ionicframework.com/t/ionic-7-angular-and-swiper-11-0-3-event-did-not-trigger/237358 Nice caveat I found, did trick me at first: The (click) event DOES work without the "swipe" prefix, but that's a generic click handler, not the Swipe click handler: <swiper-container (click)="handler()" receives a regular click event <swiper-container (swiperclick)="handler()" event.detail contains pointerup data. This is the ACTUAL Swipe (click) implementation, see https://swiperjs.com/swiper-api#event-click Didn't edit the full table -- I'm not a guru and I could be barking up the wrong tree here, so I added it as a note for now o_O
|
@arnotixe is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Hey there! Apologies for the delay. I appreciate you making this PR. I am going to consolidate this with #3435, and I will give you co-author credit when the PR merges. Let me know if you have any questions. Thanks! |
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.
on ionic 7.5.5, swiper 11.0.4 the events table should probably be rewritten to have the prefix "swiper" added to all the events.
event called "init" in table -> swiperinit
and so on, for all events.
Reasons:
I found that (init) didn't trig, but (swiperinit) found in the Swiper Element Docs did the trick.
There are forum answers putting us on this track too:
https://forum.ionicframework.com/t/ionic-7-angular-and-swiper-11-0-3-event-did-not-trigger/237358
Nice caveat I found, had me fooled at first:
The (click) event DOES work without the "swipe" prefix, but that's a generic click handler, not the Swipe click handler:
receives a regular click event
event.detail contains pointerup data. This is the ACTUAL Swipe (click) implementation, see https://swiperjs.com/swiper-api#event-click
I didn't edit the full table -- I'm not a guru and I could be barking up the wrong tree here, so I added this as a note for now o_O