Skip to content

Commit cc9957b

Browse files
authored
[Bug]: Fix quantity value search by magnifier (#1043)
1 parent 1ff7ff1 commit cc9957b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Helper/GridHelperService.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,13 @@ public function getFilterCondition(string $filterJson, ClassDefinition $class, ?
239239
$operator = 'in';
240240
$matches = preg_split('/[^0-9\.]+/', $filter['value'][0][0] ?? [], -1, PREG_SPLIT_NO_EMPTY);
241241
if (is_array($matches) && count($matches) > 0) {
242-
$filter['value'][0][0] = implode(',', array_unique(array_map(floatval(...), $matches)));
242+
$uniqueIds = array_unique(array_map(floatval(...), $matches));
243+
if (count($uniqueIds) > 1) {
244+
$filter['value'][0][0] = implode(',', $uniqueIds);
245+
} else {
246+
$filter['value'][0][0] = $uniqueIds[0];
247+
$operator = '=';
248+
}
243249
} else {
244250
continue;
245251
}

0 commit comments

Comments
 (0)