Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/api/refresher.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ The native refreshers can be disabled by setting the `pullingIcon` on the [refre

Refresher requires a scroll container to function. When using a virtual scrolling solution, you will need to disable scrolling on the `ion-content` and indicate which element container is responsible for the scroll container with the `.ion-content-scroll-host` class target.

Developers should apply the following CSS to the scrollable container. This CSS adds a "rubber band" scrolling effect on iOS which allows the native iOS refresher to work properly:

```css
.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: "";
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
```

import CustomScrollTarget from '@site/static/usage/v7/refresher/custom-scroll-target/index.md';

<CustomScrollTarget />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,22 @@
width: 100%;
overflow-y: auto;
}

.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: '';
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
```
18 changes: 18 additions & 0 deletions static/usage/v7/refresher/custom-scroll-target/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@
width: 100%;
overflow-y: auto;
}

.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: '';
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
</style>
</head>

Expand Down
18 changes: 18 additions & 0 deletions static/usage/v7/refresher/custom-scroll-target/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,23 @@
width: 100%;
overflow-y: auto;
}

.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: '';
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
</style>
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,22 @@
width: 100%;
overflow-y: auto;
}

.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: '';
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
```
18 changes: 18 additions & 0 deletions static/usage/v7/refresher/custom-scroll-target/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,23 @@
width: 100%;
overflow-y: auto;
}

.ion-content-scroll-host::before,
.ion-content-scroll-host::after {
position: absolute;

width: 1px;
height: 1px;

content: '';
}

.ion-content-scroll-host::before {
bottom: -1px;
}

.ion-content-scroll-host::after {
top: -1px;
}
</style>
```