Skip to content
Snippets Groups Projects
Commit 491eb520 authored by jojohoch's avatar jojohoch
Browse files

[player] Check if element can subscribe `focusin`

parent 8070921b
No related branches found
No related tags found
No related merge requests found
...@@ -51,11 +51,13 @@ export class ElementComponent implements OnInit { ...@@ -51,11 +51,13 @@ export class ElementComponent implements OnInit {
this.unitStateService.registerElement(elementComponent.elementModel); this.unitStateService.registerElement(elementComponent.elementModel);
elementComponent.onFocusin if (elementComponent.onFocusin) {
.pipe(takeUntil(this.ngUnsubscribe)) elementComponent.onFocusin
.subscribe(() => { .pipe(takeUntil(this.ngUnsubscribe))
this.unitStateService.changeElementStatus({ id: this.elementModel.id, status: 'TOUCHED' }); .subscribe(() => {
}); this.unitStateService.changeElementStatus({ id: this.elementModel.id, status: 'TOUCHED' });
});
}
if (Object.prototype.hasOwnProperty.call(this.elementModel, 'required')) { if (Object.prototype.hasOwnProperty.call(this.elementModel, 'required')) {
const elementForm = this.formBuilder.group({}); const elementForm = this.formBuilder.group({});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment