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

[Ionic v4] Type definition of InfiniteScroll event #15049

Closed
peterpeterparker opened this issue Aug 5, 2018 · 3 comments
Closed

[Ionic v4] Type definition of InfiniteScroll event #15049

peterpeterparker opened this issue Aug 5, 2018 · 3 comments
Labels
type: feature request a new feature, enhancement, or improvement

Comments

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Aug 5, 2018

Ionic Info
@ionic/angular: "4.0.0-beta.1"

Describe the Feature Request
As displayed in the breaking changes list, https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md, the ionInfinite get an event as parameter with which the scrolling could/should be stopped

This event is provided, correct me if I'm wrong, without any typings definition

doInfinite(event: any) {
    event.target.complete();
}

Proposal solution
As already reported regarding other types, #14784, I would like to have the ability to use a type definition for this event too, something like

doInfinite(event: InfiniteScrollEvent) {
    event.target.complete();
}
@ionitron-bot ionitron-bot bot added the triage label Aug 5, 2018
@paulstelzer paulstelzer added type: feature request a new feature, enhancement, or improvement and removed triage labels Dec 3, 2018
@ashinpaugh
Copy link

ashinpaugh commented Dec 13, 2018

Not sure if this is what you're looking for, but here's what I've been using.

/**
 * Built initially for the IonInfiniteScroll's ionInfinite event.
 *
 * @author Austin Shinpaugh
 */
export interface AsyncEvent extends CustomEvent {
  target: EventTarget & {
    /**
     * Disable the ability to trigger another async event.
     */
    disabled: boolean;

    /**
     * How far the user should have to scroll before loading the next chunk of content.
     */
    threshold: string;

    /**
     * The position of the infinite loading component.
     *
     * Possible values are top or bottom.
     */
    position: string;

    /**
     * Ends the async loading animation.
     */
    complete(): void;
  };
}

@peterpeterparker
Copy link
Contributor Author

peterpeterparker commented Dec 13, 2018

I guess as #14784 which I recently closed, I could also close this one as I was able to migrate without it and as it seems that no one else is interested of having access to an exposed type definition

@ionitron-bot
Copy link

ionitron-bot bot commented Jan 12, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants