mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
fix(item): emit the ion swipe event correctly from options
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Component, Element, Prop } from '@stencil/core';
|
||||
import { Component, Element, Event, EventEmitter, Prop } from '@stencil/core';
|
||||
import { isRightSide, Side } from '../../utils/helpers';
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ export class ItemOptions {
|
||||
/**
|
||||
* @output {event} Emitted when the item has been fully swiped.
|
||||
*/
|
||||
// @Event() ionSwipe: EventEmitter;
|
||||
@Event() ionSwipe: EventEmitter;
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
|
@ -358,9 +358,9 @@ export class ItemSliding {
|
||||
*/
|
||||
fireSwipeEvent() {
|
||||
if (this.state & SlidingState.SwipeRight) {
|
||||
this.rightOptions.ionSwipe(this);
|
||||
this.rightOptions.ionSwipe.emit(this);
|
||||
} else if (this.state & SlidingState.SwipeLeft) {
|
||||
this.leftOptions.ionSwipe(this);
|
||||
this.leftOptions.ionSwipe.emit(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user