NO BUG: One issue in load more Action

Browser: Chrome 130.0.6723.93
OS: Windows
URL: Query Loop – Try Bricks – t7b3ff1b

Hi bricks team,

According to Thomas’ YouTube video, if we use the load more interaction for the query Loop, everything will be great, but there will be one problem…

If we reach the end of the list of posts by clicking the load more button, the load more button will still be visible. This makes users think that the list continues, they click on the load more button, but nothing happens. Please see the live link.

Thank you

Hi Hosein,
You can use an interaction to hide the button once there are no results:

Best,
timmse

Hi @timmse,

By default, when we reach the end of the post list, the Load more button is hidden. But the problem arises when we want to use ajax loader.

Screenshot

Sorry, I don’t get it.

vs

:grey_question:

Sorry, but what exactly is the problem with the ajax loader?

Please see this link. When you reach the end of the list of posts, the Load more button is still visible.
The reason is that to show the ajax loader, I use two interactions (Query AJAX loader start/end) to hide and show the Load more button.

I hope I conveyed my words well.

Well, your interaction ensures that the button is visible again at the end :smiley:

I’ll try to paraphrase the “problem” as I understand it:

You want to display the ajax loader in the same place as the button and hide the button when loading, right?

If so, you don’t even need an interaction, just this on the button:

%root%.is-loading {
  display: none;
}

Thank you @timmse,

It works great now🙌 I apologize if I made my point difficult. Because I use google translate.

No problem :v: Try using deepl.com, which is much better in my experience.

1 Like