mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(): update to latest stencil
This commit is contained in:
@ -17,109 +17,26 @@ Separating the `ion-infinite-scroll` and `ion-infinite-scroll-content` component
|
||||
|
||||
## Properties
|
||||
|
||||
#### disabled
|
||||
|
||||
boolean
|
||||
|
||||
If true, the infinite scroll will be hidden and scroll event listeners
|
||||
will be removed.
|
||||
|
||||
Set this to true to disable the infinite scroll from actively
|
||||
trying to receive new data while scrolling. This is useful
|
||||
when it is known that there is no more data that can be added, and
|
||||
the infinite scroll is no longer needed.
|
||||
|
||||
|
||||
#### position
|
||||
|
||||
string
|
||||
|
||||
The position of the infinite scroll element.
|
||||
The value can be either `top` or `bottom`.
|
||||
Defaults to `bottom`.
|
||||
|
||||
|
||||
#### threshold
|
||||
|
||||
string
|
||||
|
||||
The threshold distance from the bottom
|
||||
of the content to call the `infinite` output event when scrolled.
|
||||
The threshold value can be either a percent, or
|
||||
in pixels. For example, use the value of `10%` for the `infinite`
|
||||
output event to get called when the user has scrolled 10%
|
||||
from the bottom of the page. Use the value `100px` when the
|
||||
scroll is within 100 pixels from the bottom of the page.
|
||||
Defaults to `15%`.
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
#### disabled
|
||||
|
||||
boolean
|
||||
|
||||
If true, the infinite scroll will be hidden and scroll event listeners
|
||||
will be removed.
|
||||
|
||||
Set this to true to disable the infinite scroll from actively
|
||||
trying to receive new data while scrolling. This is useful
|
||||
when it is known that there is no more data that can be added, and
|
||||
the infinite scroll is no longer needed.
|
||||
|
||||
|
||||
#### position
|
||||
|
||||
string
|
||||
|
||||
The position of the infinite scroll element.
|
||||
The value can be either `top` or `bottom`.
|
||||
Defaults to `bottom`.
|
||||
|
||||
|
||||
#### threshold
|
||||
|
||||
string
|
||||
|
||||
The threshold distance from the bottom
|
||||
of the content to call the `infinite` output event when scrolled.
|
||||
The threshold value can be either a percent, or
|
||||
in pixels. For example, use the value of `10%` for the `infinite`
|
||||
output event to get called when the user has scrolled 10%
|
||||
from the bottom of the page. Use the value `100px` when the
|
||||
scroll is within 100 pixels from the bottom of the page.
|
||||
Defaults to `15%`.
|
||||
| Property | Attribute | Description | Type |
|
||||
| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| `disabled` | `disabled` | If true, the infinite scroll will be hidden and scroll event listeners will be removed. Set this to true to disable the infinite scroll from actively trying to receive new data while scrolling. This is useful when it is known that there is no more data that can be added, and the infinite scroll is no longer needed. | `boolean` |
|
||||
| `position` | `position` | The position of the infinite scroll element. The value can be either `top` or `bottom`. Defaults to `bottom`. | `'top' | 'bottom'` |
|
||||
| `threshold` | `threshold` | The threshold distance from the bottom of the content to call the `infinite` output event when scrolled. The threshold value can be either a percent, or in pixels. For example, use the value of `10%` for the `infinite` output event to get called when the user has scrolled 10% from the bottom of the page. Use the value `100px` when the scroll is within 100 pixels from the bottom of the page. Defaults to `15%`. | `string` |
|
||||
|
||||
|
||||
## Events
|
||||
|
||||
#### ionInfinite
|
||||
|
||||
Emitted when the scroll reaches
|
||||
the threshold distance. From within your infinite handler,
|
||||
you must call the infinite scroll's `complete()` method when
|
||||
your async operation has completed.
|
||||
| Event | Description |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ionInfinite` | Emitted when the scroll reaches the threshold distance. From within your infinite handler, you must call the infinite scroll's `complete()` method when your async operation has completed. |
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
#### complete()
|
||||
|
||||
Call `complete()` within the `infinite` output event handler when
|
||||
your async operation has completed. For example, the `loading`
|
||||
state is while the app is performing an asynchronous operation,
|
||||
such as receiving more data from an AJAX request to add more items
|
||||
to a data list. Once the data has been received and UI updated, you
|
||||
then call this method to signify that the loading has completed.
|
||||
This method will change the infinite scroll's state from `loading`
|
||||
to `enabled`.
|
||||
|
||||
|
||||
#### waitFor()
|
||||
|
||||
Pass a promise inside `waitFor()` within the `infinite` output event handler in order to
|
||||
change state of infiniteScroll to "complete"
|
||||
|
||||
| Method | Description |
|
||||
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `complete` | Call `complete()` within the `infinite` output event handler when your async operation has completed. For example, the `loading` state is while the app is performing an asynchronous operation, such as receiving more data from an AJAX request to add more items to a data list. Once the data has been received and UI updated, you then call this method to signify that the loading has completed. This method will change the infinite scroll's state from `loading` to `enabled`. |
|
||||
| `waitFor` | Pass a promise inside `waitFor()` within the `infinite` output event handler in order to change state of infiniteScroll to "complete" |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
Reference in New Issue
Block a user