• I have a tablesome table and I would like to make the plugin Firelight Lightbox working. Apparently the plugin doesn’t work properly because when the user uses the pagination new rows are loaded using an ajax event. Now, in order to make Firelight working I need to make sure that he’s able to detect also the new content, but in order to do that I’d like to name where I should place the code inside the plugin repository or know the name of the ajax event that it’s triggered with pagination clicks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • FirelightWP

    (@firelightwp)

    I’d like to add to this.

    We need to be able to refire the JS for Firelight Lightbox when a new Tablesome page is loaded. If ajax is always being fired, we may be able to hook onto a generic even like ajaxComplete. That would be good, because the solution would apply not just to Tablesome, but to other plugins using ajax to update page content.

    But I’m testing this now on a production site, and I actually don’t see an ajax request being made. So I’m wondering if, in at least some cases, pagination does use an ajax request. Maybe all needed data needed for a table is already fetched on initial page load, and is just being broken into page using frontend JS.

    In that case, the simplest solution here would be if Tablesome fires it’s own event each time a page is updated, ie like ‘tablesomePageChange’. If so we could simply do something like this:

    document.addEventListener('tablesomePageChange', function() {
    // Reinitialize lightbox after pagination
    });

    But I haven’t been able to find such a an event either in the docs or by digging through the code.

    Can you confirm if there’s an event being fired? If not, would you consider adding one?

    Thread Starter rubenvezzoli

    (@rubenvezzoli)

    Thanks a lot for your support!

    I hope that some of the Tablesome developers can reply to your question. @essekia

    Plugin Author Essekia

    (@essekia)

    @rubenvezzoli , @firelightwp Right now, we use Svelte for the UI. But, all the data is current stored in a Svelte Store in the frontend.

    On Pagination, I will try to add an event that is listenable using js.

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.