filter lookups improvements

This commit is contained in:
Jan Prochazka
2021-11-20 11:50:59 +01:00
parent 6f7452ab6d
commit f010e7c934
4 changed files with 8 additions and 5 deletions

View File

@@ -6,6 +6,8 @@ export type FilterMultipleValuesMode = 'is' | 'is_not' | 'contains' | 'begins' |
export function getFilterValueExpression(value, dataType) {
if (value == null) return 'NULL';
if (isTypeDateTime(dataType)) return moment(value).format('YYYY-MM-DD HH:mm:ss');
if (value === true) return 'TRUE';
if (value === false) return 'FALSE';
return `="${value}"`;
}