Ajax search module and scroll

Elgg 4.1.4

Site Setting : Default pagination behaviour of lists : Append new list data before or after the list (automatically if scrolled into view)

 

Hi everyone,

I am working on a ajax search module.

The module is displayed  on a view as you can see in the attached file. 

When I click on the "search" an ajax request is sent and the response replace the current displayed on the view(elgg_list_entities).

The search module works as expected, but after performing a search, then the scroll, the data appends to the list does not match the search criteria.

The previous data displayed when the view was first loaded is appended to the list.

How can I ensure that the data appended to the list matches the search criteria (came from the result of the search module)?

 

regards,

 

 

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking