docs(infinite-scroll): use proper equality check (#24767)

This commit is contained in:
Mat Zaremba
2022-02-22 16:02:54 +01:00
committed by GitHub
parent 8246112ca1
commit 1c3b3791d0
6 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);