Support allowed/suggested value providers

This commit is contained in:
Christopher Schleiden
2022-11-28 16:15:57 -08:00
parent 71619bee95
commit a9cdcdba80
8 changed files with 98 additions and 46 deletions
+2 -2
View File
@@ -104,7 +104,7 @@ async function getValues(
const existingValues = getExistingValues(token, parent);
if (token?.definition?.key) {
const customValues = await valueProviderConfig?.[token.definition.key]?.(workflowContext);
const customValues = await valueProviderConfig?.[token.definition.key]?.get(workflowContext);
if (customValues) {
return filterAndSortCompletionOptions(customValues, existingValues);
@@ -117,7 +117,7 @@ async function getValues(
(parent.definition?.key && defaultValueProviders[parent.definition.key]);
if (valueProvider) {
const values = await valueProvider(workflowContext);
const values = await valueProvider.get(workflowContext);
return filterAndSortCompletionOptions(values, existingValues);
}