fix: IN and NOT IN filters not working properly, fixes #687

This commit is contained in:
Fabio Di Stasio 2023-10-09 18:13:30 +02:00
parent ddd290c903
commit c0dcf30e73
1 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ const createClausole = (filter: TableFilterClausole) => {
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
let value;
if (isNumeric) {
if (isNumeric && !['IN', 'NOT IN'].includes(filter.op)) {
if (isNaN(Number(filter.value)))
filter.value = '';
if (isNaN(Number(filter.value2)))
@ -145,7 +145,7 @@ const createClausole = (filter: TableFilterClausole) => {
val = val.trim();
return isNumeric ? val : `${sw}${val}${sw}`;
}).join(',');
value = `(${filter.value})`;
value = `(${value})`;
break;
case 'IS NULL':
case 'IS NOT NULL':