fix(like filter): Append % only if not already added by user (#6069)
This commit is contained in:
parent
fa359537bb
commit
99bfa2fb17
1 changed files with 2 additions and 7 deletions
|
|
@ -331,13 +331,8 @@ frappe.ui.filter_utils = {
|
|||
|
||||
if(condition.indexOf('like', 'not like')!==-1) {
|
||||
// automatically append wildcards
|
||||
if(val) {
|
||||
if(val.slice(0,1) !== "%") {
|
||||
val = "%" + val;
|
||||
}
|
||||
if(val.slice(-1) !== "%") {
|
||||
val = val + "%";
|
||||
}
|
||||
if(val && !(val.startsWith('%') || val.endsWith('%'))) {
|
||||
val = '%' + val + '%';
|
||||
}
|
||||
} else if(in_list(["in", "not in"], condition)) {
|
||||
if(val) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue