filter input field changing its value

filter input field changing its value

barthekbarthek Posts: 3Questions: 0Answers: 0
edited April 2012 in General
I have some werid behavior with my datatables. Sadly i cant provide any live example, but this is what happens:

I have table with applied datatable on in. On page there are few other forms with inputs. When I'm changing value of ANY input on page the value of filter input field is changing to value of first input of the page (first is some hidden input field with value = "logout"). Whatmore when I'm changing those input value via firebug the filter input field changes as well.

Any ideas why it's happaning?? After hours of investigation i came up with nothing...

Replies

  • peipst9lkerpeipst9lker Posts: 11Questions: 0Answers: 0
    Check if your own inputs don't have the same id/name as the filter input.
    Also are you manipulating inputs with jquery or something?
  • barthekbarthek Posts: 3Questions: 0Answers: 0
    edited April 2012
    I checked it in first place ;)

    But after more investigation i found out what it was. The problem lied in fnSetFilteringDelay plug-in (http://datatables.net/forums/discussion/5579/fnsetfilteringdelay-found-a-bug/p1).

    But the solution in that thread was wrong also. Plug-in alone wasnt a problem. The problem was that this plugin was applied when DataTables werent fully initialised (because of internationalisation file beeing included). In that case fnSetFilteringDelay was binding events to all inputs at the page instead of just desired one. So the sulution is to apply the plugin in fnInitComplete callback.
This discussion has been closed.