fix(reorder-group): delegate dom reordering

fixes #15836
This commit is contained in:
Manu Mtz.-Almeida
2018-10-08 09:46:26 -05:00
parent 0983f95d9f
commit 5f659420fd
18 changed files with 279 additions and 219 deletions

View File

@ -1,6 +1,6 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Method, Prop, QueueApi, State, Watch } from '@stencil/core';
import { Gesture, GestureDetail, Mode } from '../../interface';
import { Gesture, GestureDetail, Mode, RefresherEventDetail } from '../../interface';
import { createThemedClasses } from '../../utils/theme';
@Component({
@ -20,6 +20,8 @@ export class Refresher implements ComponentInterface {
mode!: Mode;
@Element() el!: HTMLElement;
@Prop({ context: 'queue' }) queue!: QueueApi;
/**
@ -34,8 +36,6 @@ export class Refresher implements ComponentInterface {
*/
@State() private state: RefresherState = RefresherState.Inactive;
@Element() el!: HTMLElement;
/**
* The minimum distance the user must pull down until the
* refresher will go into the `refreshing` state. Defaults to `60`.
@ -77,7 +77,7 @@ export class Refresher implements ComponentInterface {
* Updates the refresher state to `refreshing`. The `complete()` method should be
* called when the async operation has completed.
*/
@Event() ionRefresh!: EventEmitter<void>;
@Event() ionRefresh!: EventEmitter<RefresherEventDetail>;
/**
* Emitted while the user is pulling down the content and exposing the refresher.
@ -307,7 +307,9 @@ export class Refresher implements ComponentInterface {
// emit "refresh" because it was pulled down far enough
// and they let go to begin refreshing
this.ionRefresh.emit();
this.ionRefresh.emit({
complete: this.complete.bind(this)
});
}
private close(state: RefresherState, delay: string) {