Does the DataTable run any process when search filter is active?

Does the DataTable run any process when search filter is active?

CarlTujiCarlTuji Posts: 2Questions: 1Answers: 0
edited January 2017 in Free community support

First of all, DataTable is awesome!!!

I set a table to organize the inventory of the company I work for, and we have a cell (td.editable) to handle the quantity of some product. Then when $(document).ready() I bind a ".on('dblclick',function(){})" to create an input on-the-fly in the style of the phpMyAdmin. Then bind a .on('keydown') to capture ENTER key press and a ".on('blur')" to capture the input lost focus event, then save the changes or cancel on ESC key.

Everything works fine if the search is null, but if we search for something and dblclick the td.editable, the input is blurred a few moments after it's created.

What could be happens and how can I fix this?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,839Questions: 1Answers: 10,518 Site admin
    Answer ✓

    I don't understand what would be causing that I'm afraid. DataTables shouldn't be doing anything unless it is instructed to. We'd need a test case.

    Allan

  • CarlTujiCarlTuji Posts: 2Questions: 1Answers: 0
    edited January 2017

    Hi Allan! Thanks for reply!

    I was working in the test case when I realize what's happening! The code that generate the input, was bubbling and generate more than one element, than, when the first element losts the focus, it triggers the blur event. I rewrite the code to avoid this and everything works perfect now!

    Thanks for your attention and for this amazing plugin!

This discussion has been closed.