You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an error where the search text input was generating a string like
search[last_name_or_first_name_or_middle_namefalse]=L
i think it was trying to generate
search[last_name_or_first_name_or_middle_name_sw]=L
In the file simple_datatables.js.coffee, bRegex is initialized to false, and then line 71 says
op = bRegex ? "_contains" : "_sw"
which compiles to
op = bRegex != null ? bRegex : {
"_contains": "_sw"
};
so the next line
data.push({
name: "search[" + searchcolumns.join("or") + op + "]",
value: sSearch
});
appends "false".
The following change seems to fix the problem
// op = bRegex ? "_contains" : "_sw"
if (bRegex)
op = "_contains"
else
op = "_sw"
The text was updated successfully, but these errors were encountered:
I encountered an error where the search text input was generating a string like
search[last_name_or_first_name_or_middle_namefalse]=L
i think it was trying to generate
search[last_name_or_first_name_or_middle_name_sw]=L
In the file simple_datatables.js.coffee, bRegex is initialized to false, and then line 71 says
op = bRegex ? "_contains" : "_sw"
which compiles to
op = bRegex != null ? bRegex : {
"_contains": "_sw"
};
so the next line
data.push({
name: "search[" + searchcolumns.join("or") + op + "]",
value: sSearch
});
appends "false".
The following change seems to fix the problem
// op = bRegex ? "_contains" : "_sw"
if (bRegex)
op = "_contains"
else
op = "_sw"
The text was updated successfully, but these errors were encountered: