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

@ -6,7 +6,7 @@
"@auth0/auth0-react": "1.10.2",
"@emotion/react": "11.7.1",
"@emotion/styled": "11.6.0",
"@kingsrook/qqq-frontend-core": "1.0.123",
"@kingsrook/qqq-frontend-core": "1.0.124",
"@mui/icons-material": "5.4.1",
"@mui/material": "5.11.1",
"@mui/styles": "5.11.1",
@ -35,8 +35,8 @@
"html-react-parser": "1.4.8",
"html-to-text": "^9.0.5",
"http-proxy-middleware": "2.0.6",
"lodash": "4.17.21",
"jwt-decode": "3.1.2",
"lodash": "4.17.21",
"oidc-client-ts": "2.4.1",
"rapidoc": "9.3.4",
"react": "18.0.0",

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;
}