Skip to content

Commit

Permalink
toggle header dialog when submit event is fired in header inputs.
Browse files Browse the repository at this point in the history
Closes #779.
  • Loading branch information
imolorhe committed May 26, 2019
1 parent c76f7c6 commit 9154c4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/containers/window/window.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ <h3 class="modal-title">
placeholder="Header key"
[ngModel]="header.key"
(ngModelChange)="headerKeyChange($event, i)"
(submit)="toggleHeader()"
></app-fancy-input>
</div>
<div class="set-header-input-column">
Expand All @@ -105,6 +106,7 @@ <h3 class="modal-title">
placeholder="Header value"
[ngModel]="header.value"
(ngModelChange)="headerValueChange($event, i)"
(submit)="toggleHeader()"
></app-fancy-input>
</div>
<button class="header-input-remove-button" (click)="removeHeader(i)">&times;</button>
Expand All @@ -114,7 +116,7 @@ <h3 class="modal-title">
<div class="modal-footer">
<div class="app-dialog-footer">
<button track-id="add_header" class="app-button active-grey left" (click)="addHeader()">{{ 'ADD_HEADER_TEXT' | translate }}</button>
<button class="app-button active-primary right" (click)="toggleHeader($event)">{{ 'SAVE_BUTTON' | translate }}</button>
<button class="app-button active-primary right" (click)="toggleHeader()">{{ 'SAVE_BUTTON' | translate }}</button>
</div>
</div>
</clr-modal>
Expand Down
2 changes: 1 addition & 1 deletion src/app/containers/window/window.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class WindowComponent implements OnInit {
this.store.dispatch(new queryActions.SetQueryAction(query, this.windowId));
}

toggleHeader(isOpen) {
toggleHeader(isOpen = undefined) {
if (this.showHeaderDialog !== isOpen) {
this.store.dispatch(new dialogsActions.ToggleHeaderDialogAction(this.windowId));
}
Expand Down

0 comments on commit 9154c4e

Please sign in to comment.