Column cache is not returning values

Column cache is not returning values

dfigueiradfigueira Posts: 15Questions: 3Answers: 0
edited January 2017 in Free community support

Hi guy's,

I'm doing a big filtering system for the datatables, on which it consists on having multiple box's in each column, and in each box, there is a list of checkbox that come from the cache('search') and a multi filter system of multiple options between two selects and two inputs.

After battling with this, and almost finishing it, it came an strange issue. The cache function doesnt return any info on the data that is appearing on the table - it did yesterday. I already rollbacked alot of code and nothing.

This is the code I'm using...

table.columns().flatten().each(function (colIdx) {
    table.column(colIdx).cache('search').sort().unique().each(function (d) {
        console.log("inside")
    });
});

As you can probably guess, it should run the message in the console, but nothing. Even when getting the data directly from the cache, It doesn't bring anything.

Did this happened to anyone?

Thank you!

Replies

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

    That looks like it should work, and if you post a link to a test case showing the issue I'd be happy to take a look.

    However, it is worth noting that the cache isn't always guaranteed to be available - if DataTables hasn't requested that data, then it won't have been cached! For example if filtering is disabled.

    Allan

  • dfigueiradfigueira Posts: 15Questions: 3Answers: 0

    Stupid me allan. Only saw the topic response now... :s
    I've created this one since it's explaining it better my problem https://datatables.net/forums/discussion/40046/multi-filtering-system-problem#latest
    Is it possible to delete this one so that I can stay to the other?

    Thank you very much and sorry for the spam...

This discussion has been closed.