Having trouble using the search filter when 'copying & pasting'

Having trouble using the search filter when 'copying & pasting'

koes3koes3 Posts: 1Questions: 0Answers: 0
edited May 2013 in General
Hi,
the problem I'm facing is getting my table to update when I paste (right click and clicking paste) a word into the search box. The table updates fine when I use control + v but not when I right click and click paste.
Is there anyway to call the search on a mouse click event?

Thanks

Replies

  • ericpontoericponto Posts: 2Questions: 0Answers: 0
    This snippet worked for me.

    [code]
    $(".dataTables_filter input").on("paste", function() {
    setTimeout(function() {
    $(this).trigger("keyup.DT");
    }, 1);
    });
    [/code]
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    DataTables should probably listen for the paste event internally I guess. Thanks for flagging that up.

    Allan
This discussion has been closed.