Skip to content

Commit

Permalink
update version decimal pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
clemiller committed Apr 18, 2024
1 parent 4968134 commit 4cb4719
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="version-edit">
<mat-form-field class="version" appearance="outline">
<mat-label>version</mat-label>
<input matInput required type="number" step=".1" [ngModel]="version | number:'1.1-1'" (blur)="setVersion($event)">
<input matInput required type="number" step=".1" [ngModel]="version | number:'1.1-3'" (blur)="setVersion($event)">
</mat-form-field>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class VersionEditComponent implements OnInit {

public setVersion(event: any): void {
let newVersion = '';
if (event.target.valueAsNumber) newVersion = event.target.valueAsNumber.toFixed(1);
if (event.target.valueAsNumber) newVersion = event.target.valueAsNumber.toString();
this.config.object[this.field].version = newVersion;
}
}

0 comments on commit 4cb4719

Please sign in to comment.