Search Box Filtering / Column Rendering Question

Search Box Filtering / Column Rendering Question

snagnitssnagnits Posts: 4Questions: 2Answers: 0

I have a column renderer set up. The data for the column is a sha256 hash. I'm truncating the hash via the render callback for that column.

When the page loads, the render works as anticipated.
* When I search for the full hash, the row is not returned.
* When I search for only part of the hash that's displayed in the cell, the row is returned.

Is this expected behavior? That is, is the the expected behavior for searching via the search box (filter) to only search rendered data, not data as it exists within the DataTable construct?

This question has an accepted answers - jump to answer

Answers

  • snagnitssnagnits Posts: 4Questions: 2Answers: 0

    For funsies, I verified that it wasn't a fluke with some weird config by using the search().draw() api method. The results were the same - the only searching being done is across visible data, despite the data on the backend for that column being a full sha256 hash (vs. the truncated version that's visible)

  • kthorngrenkthorngren Posts: 20,332Questions: 26Answers: 4,774
    Answer ✓

    Have you read this doc?
    https://datatables.net/manual/data/orthogonal-data

    I think its what you are looking for.

    Kevin

  • snagnitssnagnits Posts: 4Questions: 2Answers: 0

    Kevin, much appreciated on that link! I had indeed missed this completely. Adding the type eval in the column render solved my issue entirely!

This discussion has been closed.