How to ignore orthogonal data setup on search
How to ignore orthogonal data setup on search
My dataTable uses orthogonal data (filter). Each cell information consists of text and id. I find the orthogonal data useful when using a multi-filter with dropdowns (text,id) i.e. search for bikes of a specific type( types being DB predefined and consists of text and id).
I want to use the search function from both multi-filter but with dropdowns ( i.e. https://datatables.net/examples/api/multi_filter.html) and as global search from the typical search box.
My question is how to both search for an id(int) over the data source(orthogonal data defined) but also to search for a string?
Answers
In the case of the global filter or a text input it is relatively easy - you just return both the id and the string that you want to be searchable from the orthogonal rendering function.
In the case of a dropdown
select
it would be much more difficult / impossible. You would almost certainly have to split it into twoselect
elements, one for the id and one for the string value, since theselect
options can only take a single value.To be honest, I'm not sure I've fully understood the question. If you could explain it a little more I might be able to understand it better.
Allan