Skip to content
Snippets Groups Projects
Commit 3685c92b authored by Alexander Rose's avatar Alexander Rose
Browse files

add missing `info` in ObjectList param

parent e1a04c8b
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,7 @@ export namespace ParamDefinition {
getLabel(t: T): string
}
export function ObjectList<T>(element: For<T>, getLabel: (e: T) => string, info?: Info & { defaultValue?: T[], ctor?: () => T }): ObjectList<Normalize<T>> {
return setInfo<ObjectList<Normalize<T>>>({ type: 'object-list', element: element as any as Params, getLabel, ctor: _defaultObjectListCtor, defaultValue: (info && info.defaultValue) || [] });
return setInfo<ObjectList<Normalize<T>>>({ type: 'object-list', element: element as any as Params, getLabel, ctor: _defaultObjectListCtor, defaultValue: (info && info.defaultValue) || [] }, info);
}
function _defaultObjectListCtor(this: ObjectList) { return getDefaultValues(this.element) as any; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment