Forums Forums Search & Filter Pro Issue With Table & Ajax rendering

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #236655

    Hi Trevor,

    I’ve hit a bit of a dead end trying to set this up on my site.

    On first load, the pagination of my Ninja Tables Pro plugin works correctly – but as soon as I use the Search & Filter Pro plugin to filter the results (via Ajax) the table loads a new rendering of the table and this seems to override the pagination that is set in Ninja Tables.

    As you can see in the video below, I have the pagination set in Ninja Tables to 8.

    If I change the “Results per page:” in S&FP to 8, it only loads 8 product and no more.

    SCREENCAST OF ISSUE: https://screencast-o-matic.com/watch/cYeI21xUF5

    Do you know why there seems to be a different rendering of the table upon filtering that is overriding the Ninja Table settings? If I turn Ajax off it loads the table correctly (ie. with pagination) every time, but I require Ajax annoyingly.

    Very much stuck and any help or suggestions would be welcomed.

    Thanks very much,

    Trevor
    #236669

    It rather depends on the Ajax Container setting. Are you able to send me a live link/URL to your search page so I can take a look (with Ajax on, if you can suffer it being on, as your site might be live)?

    Anonymous
    #236687

    Thanks for the quick response.

    Here’s the link to the live site as set up in the video.

    http://skifonixsounds.com/sampleshare/copyright-free-music-home-page

    I can also provide login info if needed.

    Thanks !

    Anonymous
    #236698

    Hi Trevor,

    So I’ve been given this script by Ninja Table and they’ve said the following…

    Hello Lewis,

    Understood your situation here, if you want to force the pagination, you need to run this script while after each filtering. It will enable the pagination again.

    We are not familiar with the plugin you are using, you might have to get their help to run this script after each filtering.

    jQuery(function($){
        $('.table').footable({
            "paging": {
                "enabled": true
            }
        });
    });

    Thanks

    Would it be possible to direct me to how I could add this script to run this script after each filtering?

    Thanks in advance,

    Anonymous
    #236714

    Managed to get it working with the below code put in the footer…

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    
     $('.table').footable({
            "paging": {
                "enabled": true
            }
        });
    
      });
    }(jQuery));</script>

    Just posting for others who might find useful.

    Will close topic, cheers guys!

    Trevor
    #236813
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)