Support passing possibleValueSourceFilter through to backend, specifically for the "standalone" use-case, where the field doesn't come from a table or process

This commit is contained in:
2025-07-14 15:54:25 -05:00
parent 90fd03ae46
commit 86dcc90e1d
4 changed files with 19 additions and 3 deletions

View File

@ -191,6 +191,11 @@ class DynamicFormUtils
props.possibleValueSourceName = field.possibleValueSourceName;
}
if(field.possibleValueSourceFilter)
{
props.possibleValueSourceFilter = field.possibleValueSourceFilter;
}
dynamicFormFields[field.name].possibleValueProps = props;
}
}

View File

@ -188,7 +188,16 @@ function DynamicSelect({fieldPossibleValueProps, overrideId, name, fieldLabel, i
}
else
{
return await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, null, otherValues, useCase);
return await qController.possibleValues(
{
tableName,
processName,
fieldNameOrPossibleValueSourceName: possibleValueSourceName ?? fieldName,
searchTerm: searchTerm ?? "",
values: otherValues,
useCase,
possibleValueSourceFilter: fieldPossibleValueProps.possibleValueSourceFilter
});
}
};

View File

@ -20,6 +20,7 @@
*/
import {QPossibleValue} from "@kingsrook/qqq-frontend-core/lib/model/QPossibleValue";
import {QQueryFilter} from "@kingsrook/qqq-frontend-core/lib/model/query/QQueryFilter";
/*******************************************************************************
** Properties attached to a (formik?) form field, to denote how it behaves as
@ -34,5 +35,6 @@ export interface FieldPossibleValueProps
tableName?: string;
processName?: string;
possibleValueSourceName?: string;
possibleValueSourceFilter?: QQueryFilter;
}