Skip to content

Commit ca28ba9

Browse files
author
Romain Gilliotte
committed
fix: search highlighting not working when the column name contains underscores
1 parent 4691fff commit ca28ba9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/search-builder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function SearchBuilder(model, opts, params, fieldNamesRequested) {
110110
' LIKE ',
111111
lowerIfNecessary(`%${params.search}%`),
112112
);
113-
pushCondition(condition, columnName);
113+
pushCondition(condition, field.field);
114114
} else if (isUUID(DataTypes, primaryKeyType)
115115
&& params.search.match(REGEX_UUID)) {
116116
condition[field.field] = params.search;
@@ -145,7 +145,7 @@ function SearchBuilder(model, opts, params, fieldNamesRequested) {
145145
' LIKE ',
146146
lowerIfNecessary(`%${params.search}%`),
147147
);
148-
pushCondition(condition, columnName);
148+
pushCondition(condition, field.field);
149149
}
150150
} else if (field.type === 'Number') {
151151
let value = Number(params.search);

0 commit comments

Comments
 (0)