Pagination event?

Is there any kind of event that fires when changing pages or facet filters?

Trying to get a matchHeight.js function to clean up our grid display when changing pages or changing facet filters.

Currently I’ve got:

mysearch.on('render', function() {
  $('.result-col').matchHeight();
});

And this only seems to run on the initial render. Not when changing pages or filtering results.

Hi @alex4

You should be able to use the searchFunction for this use case. Here is a code example:

instantsearch({
  // other parameters
  searchFunction: function(helper) {
    helper.once('result', function() {
      $('.result-col').matchHeight();
    });

    helper.search();
  }
})

Tell me if that works for you :slight_smile:

Cheers, Maxime.

1 Like

That seems to do the trick. Thank you!

-A

1 Like