-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
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"
Metadata
Metadata
Assignees
Labels
No labels