Fix broken select list options
This commit is contained in:
parent
2ba5051880
commit
9bb2c44d32
|
|
@ -39,6 +39,7 @@ export class CheckList {
|
|||
const value = (input?.expression as ObjectExpression)?.value; // TODO: The "value" field is currently hardcoded, but we should be able to be more flexible and potentially have different fields for a given syntax.
|
||||
const syntax = input?.expression?.type ?? inputDescriptor.defaultSyntax;
|
||||
const selectList = this.selectList;
|
||||
const selectListItems = selectList.items
|
||||
|
||||
return (
|
||||
<elsa-input-control-switch label={displayName} hint={hint} syntax={syntax} expression={value} onExpressionChanged={this.onExpressionChanged}>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class PropertyOptionsResolver : IPropertyOptionsResolver
|
|||
}
|
||||
|
||||
var defaultOptions = inputAttribute?.Options ?? (TryGetEnumOptions(propertyInfo, out var items) ? items : null);
|
||||
return defaultOptions != null ? new Dictionary<string, object> { ["Default"] = defaultOptions } : null;
|
||||
return defaultOptions != null ? new Dictionary<string, object> { ["items"] = defaultOptions } : null;
|
||||
}
|
||||
|
||||
private bool TryGetEnumOptions(PropertyInfo activityPropertyInfo, out IList<SelectListItem>? items)
|
||||
|
|
|
|||
Loading…
Reference in a new issue