Perform column().search() on column with line breaks

Perform column().search() on column with line breaks

bavantbavant Posts: 1Questions: 1Answers: 0

Hello Community,

So basically, I need to filter my data table by column, using column().search(), by allowing the user to select a value from a drop down list. Once selected, the selected option is thrown in as the value in .column().search(val, false, true, true). The problem that we are running into is that the column in question has multiple values, separated by line breaks. When performing the search, if the user selects (by example) "C" but there are two potential values ("C" and "C++"), the search result yields any row whose column contains "C" OR "C++" when the desired result is to only see those rows with "C".

Again, the column might look like this:

C
C++
VB
Java
JavaScript

I expect to only get rows with C if I select "C" from the drop-down list; likewise, I expect to only get rows with "Java" if I select "Java" (and not Java and JavaScript.

Any suggestions?

This discussion has been closed.