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 43cfc56 commit 4665303
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/views/SelectProduct.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@
</section>
<hr />
</div>
<!--
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="loadMoreProducts($event)" threshold="100px" :disabled="!isScrollable" :key="queryString">
<ion-infinite-scroll-content loading-spinner="crescent" :loading-text="$t('Loading')"/>
</ion-infinite-scroll>
Expand Down

0 comments on commit 4665303

Please sign in to comment.