Skip to content

Commit

Permalink
Improved: added comment to the ion key change(#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Apr 16, 2024
1 parent 0882245 commit 48c369a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/views/TransferOrders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
<ion-badge slot="end">{{ order.orderStatusDesc }}</ion-badge>
</ion-item>
</ion-list>

<!--
When searching for a keyword, and if the user moves to the last item, then the didFire value inside infinite scroll becomes true and thus the infinite scroll does not trigger again on the same page(https://github.com/hotwax/users/issues/84).
In ionic v7.6.0, an issue related to infinite scroll has been fixed that when more items can be added to the DOM, but infinite scroll does not fire as the window is not completely filled with the content(https://github.com/ionic-team/ionic-framework/issues/18071).
The above fix in ionic 7.6.0 is resulting in the issue of infinite scroll not being called again.
To fix this, we have added a key with value as queryString(searched keyword), so that the infinite scroll component can be re-rendered
whenever the searched string is changed resulting in the correct behaviour for infinite scroll
-->
<ion-infinite-scroll @ionInfinite="loadMoreTransferOrders($event)" threshold="100px" :disabled="!isTransferOrdersScrollable()" :key="transferOrders.query.queryString">
<ion-infinite-scroll-content loading-spinner="crescent" :loading-text="translate('Loading')"/>
</ion-infinite-scroll>
Expand Down

0 comments on commit 48c369a

Please sign in to comment.