Question about html inside the .... - How not to include it when sorting?
Question about html inside the .... - How not to include it when sorting?
Hello.
I have a table set up and it's all great. Really thankfull for this tool. However, I recently tried to add some html code to the data.
I have a header ID, under which I have various IDs (all numerical). For example, let's say in our case it is "72". I would like to add a span around it, to change color of some of the text. So the final version instead "72" would be "72".
However when I do this, all of the html code seems to be included when the tables are deciding on the sorting so these results automatically end up at the end of the list. The question is how do I approach this matter in order for the sorting not to include the html?
Thanks in advance,
Adam.
I have a table set up and it's all great. Really thankfull for this tool. However, I recently tried to add some html code to the data.
I have a header ID, under which I have various IDs (all numerical). For example, let's say in our case it is "72". I would like to add a span around it, to change color of some of the text. So the final version instead "72" would be "72".
However when I do this, all of the html code seems to be included when the tables are deciding on the sorting so these results automatically end up at the end of the list. The question is how do I approach this matter in order for the sorting not to include the html?
Thanks in advance,
Adam.
This discussion has been closed.
Replies
Unfortunately there was also a bug in 1.9.4 which includes HTML in the filtering :-(. This has been fixed in the repo ( https://github.com/DataTables/DataTables/commit/065c2cc66b872c6964b7d31f12941f23e7f1f171 ) and will be included in the next release.
Allan
Allan