Skip to content

Commit

Permalink
Fix text input (#4122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Maciaszczyk authored and k8s-ci-robot committed Jul 25, 2019
1 parent c71ef9f commit 1e88abc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/frontend/common/components/textinput/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'brace/worker/json';
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

import {ThemeService} from '../../services/global/theme';
import {StringMap} from '@api/backendapi';

enum EditorTheme {
light = 'textmate',
Expand All @@ -35,8 +36,8 @@ enum EditorTheme {
styleUrls: ['./style.scss'],
})
export class TextInputComponent implements OnInit {
@Output() textChange = new EventEmitter<string>();
@Input() text: string;
@Output() textChange = new EventEmitter<string | StringMap>();
@Input() text: string | StringMap;
@Input() readOnly = false;
@Input() mode = 'yaml';
@Input() prettify = true;
Expand All @@ -62,7 +63,7 @@ export class TextInputComponent implements OnInit {
}
}

onTextChange(text: string): void {
onTextChange(text: string | StringMap): void {
this.text = text;
this.textChange.emit(this.text);
}
Expand Down

0 comments on commit 1e88abc

Please sign in to comment.