Select All with filter in 1.10.*?

Select All with filter in 1.10.*?

ironandsteelironandsteel Posts: 17Questions: 4Answers: 0
edited March 2017 in Free community support

I see several discussion about implementeing a select all button that will honor the current filter, but all that I've found use tabletools. Since tabletools is deprecated, what is the current way to do this in datatables 1.10.*?

Replies

  • allanallan Posts: 63,873Questions: 1Answers: 10,528 Site admin
    {
      text: "Select all (filtered)",
      action: function ( e, dt, node, config ) {
        dt.rows( { search: 'applied' } ).select();
      }
    }
    

    This uses a custom button with the rows().select() method and a selector-modifier to select only the filtered rows.

    Allan

  • ironandsteelironandsteel Posts: 17Questions: 4Answers: 0

    Perfect! Makes sense- thanks for the explanation.
    Cheers!

This discussion has been closed.