New dependency system for TagDependantUIElement

This commit is contained in:
Pieter Vander Vennet 2020-07-17 14:24:31 +02:00
parent d7809b88bc
commit a8314b39e6
6 changed files with 22 additions and 15 deletions

View file

@ -86,9 +86,9 @@ export class TagRenderingOptions implements TagDependantUIElementConstructor {
}) {
this.options = options;
}
OnlyShowIf(tagsFilter: TagsFilter) : TagDependantUIElementConstructor{
return new OnlyShowIfConstructor(tagsFilter, this);
OnlyShowIf(dependencies): TagDependantUIElementConstructor {
return new OnlyShowIfConstructor(dependencies, this);
}
@ -111,8 +111,8 @@ export class TagRenderingOptions implements TagDependantUIElementConstructor {
}
construct(tags: UIEventSource<any>, changes: Changes): TagDependantUIElement {
return new TagRendering(tags, changes, this.options);
construct(dependencies: { tags: UIEventSource<any>, changes: Changes }): TagDependantUIElement {
return new TagRendering(dependencies.tags, dependencies.changes, this.options);
}
IsKnown(properties: any): boolean {