Skip to content
Snippets Groups Projects
Commit 377e420d authored by jojohoch's avatar jojohoch
Browse files

[player] Rename click method to onClearButtonClick

parent 62df136c
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ import { TextFieldElement } from '../models/text-field-element'; ...@@ -26,7 +26,7 @@ import { TextFieldElement } from '../models/text-field-element';
(focus)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(input) : null" (focus)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(input) : null"
(blur)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(null): null"> (blur)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(null): null">
<button *ngIf="elementModel.clearable" matSuffix mat-icon-button aria-label="Clear" <button *ngIf="elementModel.clearable" matSuffix mat-icon-button aria-label="Clear"
(click)="onClick($event)"> (click)="onClearButtonClick($event)">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
<mat-error *ngIf="elementFormControl.errors"> <mat-error *ngIf="elementFormControl.errors">
...@@ -52,7 +52,7 @@ import { TextFieldElement } from '../models/text-field-element'; ...@@ -52,7 +52,7 @@ import { TextFieldElement } from '../models/text-field-element';
(focus)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(input) : null" (focus)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(input) : null"
(blur)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(null): null"> (blur)="elementModel.inputAssistancePreset !== 'none' ? onFocusChanged.emit(null): null">
<button *ngIf="elementModel.clearable" matSuffix mat-icon-button aria-label="Clear" <button *ngIf="elementModel.clearable" matSuffix mat-icon-button aria-label="Clear"
(click)="onClick($event)"> (click)="onClearButtonClick($event)">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
<mat-error *ngIf="elementFormControl.errors"> <mat-error *ngIf="elementFormControl.errors">
...@@ -68,7 +68,7 @@ export class TextFieldComponent extends FormElementComponent { ...@@ -68,7 +68,7 @@ export class TextFieldComponent extends FormElementComponent {
@Output() onFocusChanged = new EventEmitter<HTMLElement | null>(); @Output() onFocusChanged = new EventEmitter<HTMLElement | null>();
elementModel!: TextFieldElement; elementModel!: TextFieldElement;
onClick(event: MouseEvent) : void { onClearButtonClick(event: MouseEvent) : void {
this.elementFormControl.setValue(''); this.elementFormControl.setValue('');
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
......
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