Deep linking into DataTables

Deep linking into DataTables

cmskwarokcmskwarok Posts: 4Questions: 2Answers: 0

https://datatables.net/blog/2017-07-24

Is there a specific method to applying deep linking to an existing DataTable instance?

Answers

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin

    Do you mean that you have two different DataTables on a page and you want to limit the deep link to a single one?

    Thanks,
    Allan

  • cmskwarokcmskwarok Posts: 4Questions: 2Answers: 0

    I have an instance defined as such and looking to apply the deep linking to the same instance.

    var assignmentTable = $('#assignment').DataTable({
    autoWidth:false,
    dom:'Bfrtip',
    stateSave:true,
    searching:false,
    info:false,
    ajax:"assignments.cfm",
    ...

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin

    I see - thanks. You could use something like:

    var deep = $.fn.dataTable.ext.deepLink( [
        'search.search', 'order', 'displayStart'
    ] );
    
    $('#myTable').DataTable( {
      $.extend( {
        autoWidth: false,
        ...
      }, deep );
    } );
    

    Allan

This discussion has been closed.