From 314114f5e1355b0cc9a99f73575b1ac9bf356022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fatay=20=C3=87ivici?= Date: Thu, 24 Mar 2016 18:59:37 +0200 Subject: [PATCH] Fixed #134 --- components/spinner/spinner.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/spinner/spinner.ts b/components/spinner/spinner.ts index 69957c67b73..65429da4f5b 100644 --- a/components/spinner/spinner.ts +++ b/components/spinner/spinner.ts @@ -8,7 +8,7 @@ import {DomHandler} from '../dom/domhandler'; + (keydown)="onInputKeydown($event,in)" (input)="onInput($event)" (blur)="onBlur(in)" (change)="handleChange($event)"> @@ -190,6 +190,12 @@ export class Spinner implements AfterViewInit { this.valueChange.next(this.value); } + onBlur(inputElement) { + if(this.value !== undefined && this.value !== null) { + inputElement.value = this.value; + } + } + parseValue(val: string): number { let value: number; if(val.trim() === '') {