mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
docs(infinite-scroll): use proper equality check (#24767)
This commit is contained in:
@ -69,7 +69,7 @@ export class InfiniteScrollExample {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
event.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
@ -111,7 +111,7 @@ infiniteScroll.addEventListener('ionInfinite', function(event) {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
event.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
@ -164,7 +164,7 @@ const InfiniteScrollExample: React.FC = () => {
|
||||
pushData();
|
||||
console.log('Loaded data');
|
||||
ev.target.complete();
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
setInfiniteDisabled(true);
|
||||
}
|
||||
}, 500);
|
||||
@ -263,7 +263,7 @@ export class InfiniteScrollExample {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (this.data.length == 1000) {
|
||||
if (this.data.length === 1000) {
|
||||
ev.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
@ -380,7 +380,7 @@ export default defineComponent({
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (items.value.length == 1000) {
|
||||
if (items.value.length === 1000) {
|
||||
ev.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
|
@ -36,7 +36,7 @@ export class InfiniteScrollExample {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
event.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
|
@ -25,7 +25,7 @@ infiniteScroll.addEventListener('ionInfinite', function(event) {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
event.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
|
@ -37,7 +37,7 @@ const InfiniteScrollExample: React.FC = () => {
|
||||
pushData();
|
||||
console.log('Loaded data');
|
||||
ev.target.complete();
|
||||
if (data.length == 1000) {
|
||||
if (data.length === 1000) {
|
||||
setInfiniteDisabled(true);
|
||||
}
|
||||
}, 500);
|
||||
|
@ -38,7 +38,7 @@ export class InfiniteScrollExample {
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (this.data.length == 1000) {
|
||||
if (this.data.length === 1000) {
|
||||
ev.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
|
@ -73,7 +73,7 @@ export default defineComponent({
|
||||
|
||||
// App logic to determine if all data is loaded
|
||||
// and disable the infinite scroll
|
||||
if (items.value.length == 1000) {
|
||||
if (items.value.length === 1000) {
|
||||
ev.target.disabled = true;
|
||||
}
|
||||
}, 500);
|
||||
|
Reference in New Issue
Block a user