mirror of https://github.com/Fabio286/antares.git
fix: IN and NOT IN filters not working properly, fixes #687
This commit is contained in:
parent
ddd290c903
commit
c0dcf30e73
|
@ -122,7 +122,7 @@ const createClausole = (filter: TableFilterClausole) => {
|
||||||
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
||||||
let value;
|
let value;
|
||||||
|
|
||||||
if (isNumeric) {
|
if (isNumeric && !['IN', 'NOT IN'].includes(filter.op)) {
|
||||||
if (isNaN(Number(filter.value)))
|
if (isNaN(Number(filter.value)))
|
||||||
filter.value = '';
|
filter.value = '';
|
||||||
if (isNaN(Number(filter.value2)))
|
if (isNaN(Number(filter.value2)))
|
||||||
|
@ -145,7 +145,7 @@ const createClausole = (filter: TableFilterClausole) => {
|
||||||
val = val.trim();
|
val = val.trim();
|
||||||
return isNumeric ? val : `${sw}${val}${sw}`;
|
return isNumeric ? val : `${sw}${val}${sw}`;
|
||||||
}).join(',');
|
}).join(',');
|
||||||
value = `(${filter.value})`;
|
value = `(${value})`;
|
||||||
break;
|
break;
|
||||||
case 'IS NULL':
|
case 'IS NULL':
|
||||||
case 'IS NOT NULL':
|
case 'IS NOT NULL':
|
||||||
|
|
Loading…
Reference in New Issue