-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(reorder-group): remove required parameter for the complete method (…
- Loading branch information
1 parent
a5b9066
commit bd96491
Showing
50 changed files
with
1,576 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,6 @@ export default class ActionSheetExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,5 +59,4 @@ export default class ActionSheetExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -797,7 +797,6 @@ export default class AlertExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,5 +267,4 @@ export default class AlertExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,52 @@ | ||
```tsx | ||
import React from 'react'; | ||
import React, { Component } from 'react'; | ||
|
||
import { IonAvatar } from '@ionic/react'; | ||
import { IonButton, IonContent, IonInfiniteScroll, IonInfiniteScrollContent, IonList } from '@ionic/react'; | ||
|
||
const Example: React.SFC<{}> = () => ( | ||
export default class Example extends Component<Props, State> { | ||
|
||
<IonContent> | ||
<IonButton onClick="toggleInfiniteScroll()" expand="block"> | ||
Toggle Infinite Scroll | ||
</IonButton> | ||
ionInfiniteScrollRef: React.RefObject<HTMLionInfiniteScrollElement> | ||
|
||
<IonList></IonList> | ||
|
||
<IonInfinite-scroll threshold="100px" (ionInfinite)="loadData($event)"> | ||
<IonInfinite-scrollContent | ||
loadingSpinner="bubbles" | ||
loadingText="Loading more data..."> | ||
</IonInfinite-scrollContent> | ||
</IonInfinite-scroll> | ||
</IonContent> | ||
|
||
|
||
|
||
import { Component, ViewChild } from '@angular/core'; | ||
import { IonInfiniteScroll } from '@ionic/angular'; | ||
|
||
@Component({ | ||
selector: 'infinite-scroll-example', | ||
templateUrl: 'infinite-scroll-example.html', | ||
styleUrls: ['./infinite-scroll-example.css'] | ||
}) | ||
export class InfiniteScrollExample { | ||
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; | ||
|
||
constructor() {} | ||
|
||
loadData(event) { | ||
setTimeout(() => { | ||
console.log('Done'); | ||
event.target.complete(); | ||
|
||
// App logic to determine if all data is loaded | ||
// and disable the infinite scroll | ||
if (data.length == 1000) { | ||
event.target.disabled = true; | ||
} | ||
}, 500); | ||
} | ||
|
||
toggleInfiniteScroll() { | ||
this.infiniteScroll.disabled = !this.infiniteScroll.disabled; | ||
} | ||
constructor() { | ||
this.ionInfiniteScrollRef = React.createRef<HTMLionInfiniteScrollElement>(); | ||
} | ||
|
||
loadData = (ev: MouseEvent) => { | ||
setTimeout(() => { | ||
console.log('Done'); | ||
ev.target.complete(); | ||
|
||
// App logic to determine if all data is loaded | ||
// and disable the infinite scroll | ||
if (data.length == 1000) { | ||
ev.target.disabled = true; | ||
} | ||
}, 500); | ||
} | ||
|
||
); | ||
toggleInfiniteScroll = () => { | ||
this.ionInfiniteScrollRef.disabled = !this.ionInfiniteScrollRef.disabled; | ||
} | ||
|
||
export default Example | ||
render() { | ||
return ( | ||
<> | ||
<IonContent> | ||
<IonButton onClick="toggleInfiniteScroll()" expand="block"> | ||
Toggle Infinite Scroll | ||
</IonButton> | ||
|
||
<IonList></IonList> | ||
|
||
<IonInfiniteScroll threshold="100px" onIonInfinite={(ev) => this.loadData(ev)}> | ||
<IonInfiniteScrollContent | ||
loadingSpinner="bubbles" | ||
loadingText="Loading more data..."> | ||
</IonInfiniteScrollContent> | ||
</IonInfiniteScroll> | ||
</IonContent> | ||
</> | ||
); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,6 @@ export class LoadingExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,5 +41,4 @@ export class LoadingExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,7 +204,6 @@ export class ModalExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,4 @@ export class ModalExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,6 @@ export class PopoverExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,5 +27,4 @@ export class PopoverExample extends Component<Props, State> { | |
); | ||
} | ||
} | ||
|
||
``` |
Oops, something went wrong.