Custom Date Search blanking out SearchPanes results

Custom Date Search blanking out SearchPanes results

ianoel230982ianoel230982 Posts: 12Questions: 4Answers: 0

Link to test case:
https://live.datatables.net/cigodubo/1/edit

Description of problem:
I'm using the example here - https://datatables.net/extensions/datetime/examples/integration/datatables.html - as a basis to search the table with the DateTime extension. It works correctly in conjunction with the date logic i'm using in my function.

I'm also using SearchPanes on the same table and I'm finding that once i use the dates to search, all the data inside the searchPanes disappears and shows 'No matching records'. but still correctly searches the table. If i use SearchPanes to select a value to search before i use the date search, my searches are still correct, however it still shows 'No matching records' in all the SearchPanes.

Is there a way for the SearchPanes to update what it shows to match what is now in the table based upon the date search?

I did try using .searchPanes.rebuildPane() after the 'draw' of my table in the custom search function, but it doesn't work (not sure whether it should for my specific use case).

Any advice to get what i'm looking for?

Thanks,
Ian.

Answers

  • ianoel230982ianoel230982 Posts: 12Questions: 4Answers: 0

    Also, i am console logging the 'startDateVal' variable, and every time it changes, it adds around 300 logs for each change. This is causing my table to be very slow. Why is this?

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    Looks like there might be a compatibility issue between searchPanes.cascadePanes and using search plugins. I comments out searchPanes.cascadePanes here:
    https://live.datatables.net/cigodubo/2/edit

    Everything seems to work. Except for cascade panes. @allan will need to comment on this.

    Kevin

  • ianoel230982ianoel230982 Posts: 12Questions: 4Answers: 0

    Thanks Kevin, I think i found a previous discussion about it here - https://datatables.net/forums/discussion/65177
    So i tried what was suggested and for the most part it is working. however, if i SearchPane first, then do the date search, the date search overwrites the SearchPane (which i can live with as long as users are informed of this).

    I would still be interested as to why there are so many logs in the console each time I date search. Is it because it is searching every column of every row? If so, can i make it specific to the columns that will only have the date in?

Sign In or Register to comment.