jsonl filtering fixes

This commit is contained in:
Jan Prochazka 2022-12-18 09:08:03 +01:00
parent cf3df9cda3
commit dbfdaafb86
4 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import { dumpSqlSourceRef } from './dumpSqlSource';
export function evaluateExpression(expr: Expression, values) {
switch (expr.exprType) {
case 'column':
return values[expr.columnName];
return _.get(values, expr.columnName);
case 'placeholder':
return values.__placeholder;

View File

@ -33,6 +33,7 @@
export let customCommandIcon = null;
export let onCustomCommand = null;
export let customCommandTooltip = null;
export let formatterFunction = null;
export let pureName = null;
export let schemaName = null;
@ -276,6 +277,7 @@
schemaName,
pureName,
field: columnName || uniqueName,
formatterFunction,
onConfirm: keys => setFilter(keys.map(x => getFilterValueExpression(x)).join(',')),
});
}

View File

@ -355,6 +355,7 @@
export let pureName = undefined;
export let schemaName = undefined;
export let allowDefineVirtualReferences = false;
export let formatterFunction;
export let isLoadedAll;
export let loadedTime;
@ -1743,6 +1744,7 @@
{conid}
{database}
{jslid}
{formatterFunction}
driver={display?.driver}
filterType={useEvalFilters ? 'eval' : col.filterType || getFilterType(col.dataType)}
filter={display.getFilter(col.uniqueName)}

View File

@ -25,6 +25,7 @@
export let driver;
export let multiselect = false;
export let jslid;
export let formatterFunction;
// console.log('ValueLookupModal', conid, database, pureName, schemaName, columnName, driver);
@ -42,6 +43,7 @@
jslid,
search,
field,
formatterFunction,
});
} else {
rows = await apiCall('database-connections/load-field-values', {