Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
827 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
@Component({
selector: 'sqx-asset-changed-trigger',
styleUrls: ['./asset-changed-trigger.component.scss'],
templateUrl: './asset-changed-trigger.component.html'
})
export class AssetChangedTriggerComponent implements OnChanges {
@Input()
public trigger: any;
@Input()
public triggerForm: FormGroup;
public ngOnChanges(changes: SimpleChanges) {
if (changes['triggerForm']) {
this.triggerForm.setControl('condition',
new FormControl());
}
this.triggerForm.patchValue(this.trigger);
}
}