Why is filtering/searching not firing the Processing event?

Why is filtering/searching not firing the Processing event?

GripGrip Posts: 6Questions: 1Answers: 0

I've set up the processing dialog in my table definition and the message comes up fine when I sort a column. Unfortunately, the processing event doesn't fire when I use the search box or programatically filter the columns. The reference manual says "This event is fired when DataTables is doing some kind of processing - be it, sorting, filtering or any other kind of data processing".
Am I wrong to assume that it should fire for search or filtering? I know that the column filtering is really column searching so I figured the search box should also fire the processing event. I was also wondering if paging should fire the processing event?
Thanks.

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @Grip ,

    Yep, that's a known issue (DD-797 for my reference). I've added this thread to the issue, and I'll report back here when there's an update. Sorry for the inconvenience,

    Cheers,

    Colin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @Grip ,

    I was mistaken about the known issue, could you verify please whether you're using serverSide?

    Cheers,

    Colin

  • GripGrip Posts: 6Questions: 1Answers: 0
    edited November 2019

    I am not using server side processing. Thanks for the reply also. It's appreciated.

  • GripGrip Posts: 6Questions: 1Answers: 0

    So I may have another piece of this puzzle. I had an event listener set up for search but not for sorting/ordering. The processing dialog worked for ordering until I added an event listener for ordering. After that, it no longer worked either. Do I have to define my listener routines a different way so they chain to the processing event? Here's the one listener.
    $('#' + CLTableName).DataTable().on('search.dt', function () {
    var tableDiv = document.getElementById('divTableWrapper');
    if (tableDiv != null) {
    tableDiv.scrollTop = 0;
    }
    });

  • GripGrip Posts: 6Questions: 1Answers: 0

    Ok. Ignore my last post. I just retested my code and the progress dialog does in fact still work with the ordering event listener in my code.

  • allanallan Posts: 61,431Questions: 1Answers: 10,048 Site admin
    Answer ✓

    @Grip - You might be interested in my reply on this topic here.

    Allan

  • GripGrip Posts: 6Questions: 1Answers: 0

    Ok. Saw your post. So because the search on the client side is synchronous, the processing dialog doesn't work. Am I correct in stating that there is no intent to fix this in the foreseeable future?

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Not in the near-future, certainly. It's in the backlog but it's not a priority right now.

    Colin

  • GripGrip Posts: 6Questions: 1Answers: 0

    Ok. Thanks @allan and @colin for clearing this up for me. I appreciate the help.

This discussion has been closed.