Sorting when filter textbox in header is clicked

Sorting when filter textbox in header is clicked

dagordagor Posts: 2Questions: 1Answers: 0

Hello,

I have datatables setup like this: https://i.imgur.com/gqk43J4.png

As shown in the picture, the filterboxes are placed in the header. Ordering is enabled. When you click the textbox to apply a filter, the ordering kicks in because you're initially clicking on the header. Is there some way of neglecting or skipping the ordering event when the clicked element is a textbox? Or a triggered event that I can return early or something?

Thanks in advance!

Answers

  • dagordagor Posts: 2Questions: 1Answers: 0

    Found the solution.

    Set a click event on the textbox and execute: event.stopPropagation();

This discussion has been closed.