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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
Expand Down Expand Up @@ -82,10 +83,10 @@ export class ExampleComponent {
}
}

handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
this.addItems(3, true);
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v7/refresher/advanced/react/main_tsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';
import { ellipse } from 'ionicons/icons';

Expand Down Expand Up @@ -44,7 +44,7 @@ function Example() {
}
}, []);

function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
addItems(3, true);
event.detail.complete();
Expand Down
3 changes: 2 additions & 1 deletion static/usage/v7/refresher/advanced/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
},
setup() {
const names = [
Expand Down Expand Up @@ -82,7 +83,7 @@

addItems(5);

const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
addItems(3, true);
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

@Component({
Expand All @@ -16,10 +17,10 @@ import {
imports: [IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar],
})
export class ExampleComponent {
handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v7/refresher/basic/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';

function Example() {
function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
event.detail.complete();
Expand Down
12 changes: 10 additions & 2 deletions static/usage/v7/refresher/basic/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@
</template>

<script lang="ts">
import { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar } from '@ionic/vue';
import {
IonContent,
IonHeader,
IonRefresher,
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar },
setup() {
const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
// Any calls to load data go here
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

@Component({
Expand All @@ -16,10 +17,10 @@ import {
imports: [IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar],
})
export class ExampleComponent {
handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v7/refresher/custom-content/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';
import { chevronDownCircleOutline } from 'ionicons/icons';

function Example() {
function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
event.detail.complete();
Expand Down
12 changes: 10 additions & 2 deletions static/usage/v7/refresher/custom-content/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@
import { chevronDownCircleOutline } from 'ionicons/icons';

export default defineComponent({
components: { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar },
components: {
IonContent,
IonHeader,
IonRefresher,
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
},
setup() {
const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
// Any calls to load data go here
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

@Component({
Expand All @@ -16,10 +17,10 @@ import {
imports: [IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar],
})
export class ExampleComponent {
handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';

import './main.css';

function Example() {
function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
event.detail.complete();
Expand Down
12 changes: 10 additions & 2 deletions static/usage/v7/refresher/custom-scroll-target/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@
</template>

<script lang="ts">
import { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar } from '@ionic/vue';
import {
IonContent,
IonHeader,
IonRefresher,
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar },
setup() {
const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
// Any calls to load data go here
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

@Component({
Expand All @@ -16,10 +17,10 @@ import {
imports: [IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar],
})
export class ExampleComponent {
handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v7/refresher/pull-properties/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';

function Example() {
function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
event.detail.complete();
Expand Down
12 changes: 10 additions & 2 deletions static/usage/v7/refresher/pull-properties/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@
</template>

<script lang="ts">
import { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar } from '@ionic/vue';
import {
IonContent,
IonHeader,
IonRefresher,
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar },
setup() {
const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
// Any calls to load data go here
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
Expand Down Expand Up @@ -82,10 +83,10 @@ export class ExampleComponent {
}
}

handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
this.addItems(3, true);
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v8/refresher/advanced/react/main_tsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';
import { ellipse } from 'ionicons/icons';

Expand Down Expand Up @@ -44,7 +44,7 @@ function Example() {
}
}, []);

function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
addItems(3, true);
event.detail.complete();
Expand Down
3 changes: 2 additions & 1 deletion static/usage/v8/refresher/advanced/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
},
setup() {
const names = [
Expand Down Expand Up @@ -82,7 +83,7 @@

addItems(5);

const handleRefresh = (event: CustomEvent) => {
const handleRefresh = (event: RefresherCustomEvent) => {
setTimeout(() => {
addItems(3, true);
event.target.complete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherCustomEvent,
} from '@ionic/angular/standalone';

@Component({
Expand All @@ -16,10 +17,10 @@ import {
imports: [IonContent, IonHeader, IonRefresher, IonRefresherContent, IonTitle, IonToolbar],
})
export class ExampleComponent {
handleRefresh(event: CustomEvent) {
handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
(event.target as HTMLIonRefresherElement).complete();
event.target.complete();
}, 2000);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/usage/v8/refresher/basic/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
IonRefresherContent,
IonTitle,
IonToolbar,
RefresherEventDetail,
RefresherCustomEvent,
} from '@ionic/react';

function Example() {
function handleRefresh(event: CustomEvent<RefresherEventDetail>) {
function handleRefresh(event: RefresherCustomEvent) {
setTimeout(() => {
// Any calls to load data go here
event.detail.complete();
Expand Down
Loading