docs(content): set scrollEvents to true to listen to scroll events (#25314)

Resolves #25308
This commit is contained in:
Sean Perkins
2022-05-18 22:20:24 -04:00
committed by GitHub
parent fdc55c0727
commit 48a3794c16
3 changed files with 13 additions and 9 deletions

View File

@ -464,16 +464,18 @@ import type { ScrollBaseDetail as IContentScrollBaseDetail } from '@ionic/core';
import type { ScrollDetail as IContentScrollDetail } from '@ionic/core';
export declare interface IonContent extends Components.IonContent {
/**
* Emitted when the scroll has started.
* Emitted when the scroll has started. This event is disabled by default.
Set `scrollEvents` to `true` to enable.
*/
ionScrollStart: EventEmitter<CustomEvent<IContentScrollBaseDetail>>;
/**
* Emitted while scrolling. This event is disabled by default.
Look at the property: `scrollEvents`
Set `scrollEvents` to `true` to enable.
*/
ionScroll: EventEmitter<CustomEvent<IContentScrollDetail>>;
/**
* Emitted when the scroll has ended.
* Emitted when the scroll has ended. This event is disabled by default.
Set `scrollEvents` to `true` to enable.
*/
ionScrollEnd: EventEmitter<CustomEvent<IContentScrollBaseDetail>>;

View File

@ -4402,15 +4402,15 @@ declare namespace LocalJSX {
*/
"fullscreen"?: boolean;
/**
* Emitted while scrolling. This event is disabled by default. Look at the property: `scrollEvents`
* Emitted while scrolling. This event is disabled by default. Set `scrollEvents` to `true` to enable.
*/
"onIonScroll"?: (event: CustomEvent<ScrollDetail>) => void;
/**
* Emitted when the scroll has ended.
* Emitted when the scroll has ended. This event is disabled by default. Set `scrollEvents` to `true` to enable.
*/
"onIonScrollEnd"?: (event: CustomEvent<ScrollBaseDetail>) => void;
/**
* Emitted when the scroll has started.
* Emitted when the scroll has started. This event is disabled by default. Set `scrollEvents` to `true` to enable.
*/
"onIonScrollStart"?: (event: CustomEvent<ScrollBaseDetail>) => void;
/**

View File

@ -92,18 +92,20 @@ export class Content implements ComponentInterface {
@Prop() scrollEvents = false;
/**
* Emitted when the scroll has started.
* Emitted when the scroll has started. This event is disabled by default.
* Set `scrollEvents` to `true` to enable.
*/
@Event() ionScrollStart!: EventEmitter<ScrollBaseDetail>;
/**
* Emitted while scrolling. This event is disabled by default.
* Look at the property: `scrollEvents`
* Set `scrollEvents` to `true` to enable.
*/
@Event() ionScroll!: EventEmitter<ScrollDetail>;
/**
* Emitted when the scroll has ended.
* Emitted when the scroll has ended. This event is disabled by default.
* Set `scrollEvents` to `true` to enable.
*/
@Event() ionScrollEnd!: EventEmitter<ScrollBaseDetail>;