11/*!
2- * react-number-format - 0.1.1
2+ * react-number-format - 0.1.2
33 * Author : Sudhanshu Yadav
44 * Copyright (c) 2016 to Sudhanshu Yadav - ignitersworld.com , released under the MIT license.
55 */
66( function webpackUniversalModuleDefinition ( root , factory ) {
77 if ( typeof exports === 'object' && typeof module === 'object' )
8- module . exports = factory ( require ( "React " ) ) ;
8+ module . exports = factory ( require ( "react " ) ) ;
99 else if ( typeof define === 'function' && define . amd )
10- define ( [ "React " ] , factory ) ;
10+ define ( [ "react " ] , factory ) ;
1111 else if ( typeof exports === 'object' )
12- exports [ "NumberFormat" ] = factory ( require ( "React " ) ) ;
12+ exports [ "NumberFormat" ] = factory ( require ( "react " ) ) ;
1313 else
1414 root [ "NumberFormat" ] = factory ( root [ "React" ] ) ;
1515} ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_2__ ) {
@@ -144,7 +144,7 @@ return /******/ (function(modules) { // webpackBootstrap
144144 formatInput : function formatInput ( val ) {
145145 var _props2 = this . props ;
146146 var prefix = _props2 . prefix ;
147- var thousandSeperator = _props2 . thousandSeperator ;
147+ var thousandSeparator = _props2 . thousandSeparator ;
148148 var suffix = _props2 . suffix ;
149149 var mask = _props2 . mask ;
150150 var format = _props2 . format ;
@@ -163,7 +163,7 @@ return /******/ (function(modules) { // webpackBootstrap
163163 formattedValue = format ( formattedValue ) ;
164164 }
165165 } else {
166- if ( thousandSeperator ) formattedValue = formattedValue . replace ( / ( \d ) (? = ( \d { 3 } ) + (? ! \d ) ) / g, "$1," ) ;
166+ if ( thousandSeparator ) formattedValue = formattedValue . replace ( / ( \d ) (? = ( \d { 3 } ) + (? ! \d ) ) / g, "$1," ) ;
167167
168168 //add prefix and suffix
169169 if ( prefix ) formattedValue = prefix + formattedValue ;
@@ -218,16 +218,20 @@ return /******/ (function(modules) { // webpackBootstrap
218218 this . onChangeHandler ( e , this . props . onInput ) ;
219219 } ,
220220 render : function render ( ) {
221- var props = this . props ;
221+ var props = _extends ( { } , this . props ) ;
222222
223- if ( props . displayType === "text" ) {
223+ [ 'thousandSeparator' , 'displayType' , 'prefix' , 'suffix' , 'format' , 'mask' , 'value' ] . forEach ( function ( key ) {
224+ delete props [ key ] ;
225+ } ) ;
226+
227+ if ( this . props . displayType === "text" ) {
224228 return React . createElement (
225229 'span' ,
226- this . props ,
230+ props ,
227231 this . state . value
228232 ) ;
229233 }
230- return React . createElement ( 'input' , _extends ( { } , this . props , {
234+ return React . createElement ( 'input' , _extends ( { } , props , {
231235 type : 'tel' ,
232236 value : this . state . value ,
233237 ref : 'input' ,
0 commit comments