fix(item): emit the ion swipe event correctly from options

This commit is contained in:
Brandy Carney
2017-08-09 13:33:42 -04:00
parent fe99d1958b
commit b18f44de68
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);
}
}