mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-21 22:58:43 +00:00
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:
@ -191,6 +191,11 @@ class DynamicFormUtils
|
||||
props.possibleValueSourceName = field.possibleValueSourceName;
|
||||
}
|
||||
|
||||
if(field.possibleValueSourceFilter)
|
||||
{
|
||||
props.possibleValueSourceFilter = field.possibleValueSourceFilter;
|
||||
}
|
||||
|
||||
dynamicFormFields[field.name].possibleValueProps = props;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user