Browse Source

Fix reset.

pull/641/head
Sebastian 6 years ago
parent
commit
383e8f90f0
  1. 3
      frontend/app/features/content/shared/forms/array-item.component.ts
  2. 2
      frontend/app/features/content/shared/forms/field-editor.component.html
  3. 4
      frontend/app/framework/angular/forms/editors/iframe-editor.component.ts

3
frontend/app/features/content/shared/forms/array-item.component.ts

@ -10,7 +10,6 @@ import { AppLanguageDto, EditContentForm, FieldArrayItemForm, FieldArrayItemValu
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { ArraySectionComponent } from './array-section.component';
import { FieldEditorComponent } from './field-editor.component';
interface State {
// The when the section is collapsed.
@ -63,7 +62,7 @@ export class ArrayItemComponent extends StatefulComponent<State> implements OnCh
@Input()
public languages: ReadonlyArray<AppLanguageDto>;
@ViewChildren(FieldEditorComponent)
@ViewChildren(ArraySectionComponent)
public sections: QueryList<ArraySectionComponent>;
public isCollapsed = false;

2
frontend/app/features/content/shared/forms/field-editor.component.html

@ -9,7 +9,7 @@
<div>
<ng-container *ngIf="field.properties.editorUrl; else noEditor">
<sqx-iframe-editor [url]="field.properties.editorUrl"
<sqx-iframe-editor [url]="field.properties.editorUrl" #editor
[context]="formContext"
[formControl]="editorControl"
[formValue]="form.valueChanges | async"

4
frontend/app/framework/angular/forms/editors/iframe-editor.component.ts

@ -148,6 +148,10 @@ export class IFrameEditorComponent extends StatefulControlComponent<State, any>
this.sendDisabled();
}
public reset() {
this.sendInit();
}
private sendInit() {
this.sendMessage('init', { context: this.context || {} });
}

Loading…
Cancel
Save