Basic Sort with Foundation 6.4.3 tabs

Basic Sort with Foundation 6.4.3 tabs

ksascommksascomm Posts: 1Questions: 1Answers: 0
edited December 2017 in Free community support

Has anyone managed to get two separate tables on two tabs in Foundation 6 to sort when either tab is active? If so, what is Foundation using to trigger their tab method call?

I can obviously get the first loaded tab to sort, but not the second.

I cant seem to find a Foundation 6 equivalent for shown.bs.tab or a[data-toggle="tab"] as mentioned on the Scrolling and Bootstrap tabs tutorial page, as it appears F6 uses ARIA roles.

Answers

  • allanallan Posts: 62,211Questions: 1Answers: 10,205 Site admin

    The Foundation 6 docs suggest that change.zf.tabs would be the event handler to use:

        $('[data-tabs]').on( 'change.zf.tabs', function (e) {
            $.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
        } );
    

    The selector for the first part would depend upon whatever your HTML for your tabs is.

    Allan

This discussion has been closed.