@@ -9,6 +9,7 @@ import computeProps from '../../Utils/computeProps';
99import Input from './Input' ;
1010import _ from 'lodash' ;
1111
12+ var keyIndex = 0 ;
1213
1314export default class InputGroup extends NativeBaseComponent {
1415
@@ -75,7 +76,8 @@ export default class InputGroup extends NativeBaseComponent {
7576 var addedProps = _ . merge ( this . getInitialStyle ( ) . textInput , type ) ;
7677
7778 var defaultProps = {
78- style : addedProps
79+ style : addedProps ,
80+ key : keyIndex ++
7981 }
8082
8183 return computeProps ( this . props , defaultProps ) ;
@@ -93,7 +95,8 @@ export default class InputGroup extends NativeBaseComponent {
9395 }
9496
9597 var defaultProps = {
96- style : defaultStyle
98+ style : defaultStyle ,
99+ key : keyIndex ++
97100 }
98101
99102 return computeProps ( icon . props , defaultProps ) ;
@@ -127,23 +130,23 @@ export default class InputGroup extends NativeBaseComponent {
127130 if ( Array . isArray ( this . props . children ) ) {
128131
129132 if ( this . props . iconRight ) {
130- newChildren . push ( < Input { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
133+ newChildren . push ( < Input key = { keyIndex ++ } { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
131134 newChildren . push ( React . cloneElement ( iconElement [ 0 ] , this . getIconProps ( iconElement [ 0 ] ) ) ) ;
132135 }
133136 else {
134137 if ( iconElement . length > 1 ) {
135138 newChildren . push ( React . cloneElement ( iconElement [ 0 ] , this . getIconProps ( iconElement [ 0 ] ) ) ) ;
136- newChildren . push ( < Input { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
139+ newChildren . push ( < Input key = { keyIndex ++ } { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
137140 newChildren . push ( React . cloneElement ( iconElement [ 1 ] , this . getIconProps ( iconElement [ 1 ] ) ) ) ;
138141 } else {
139142 newChildren . push ( React . cloneElement ( iconElement [ 0 ] , this . getIconProps ( iconElement [ 0 ] ) ) ) ;
140- newChildren . push ( < Input { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
143+ newChildren . push ( < Input key = { keyIndex ++ } { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
141144 }
142145 }
143146 }
144147
145148 else {
146- newChildren . push ( < Input { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
149+ newChildren . push ( < Input key = { keyIndex ++ } { ...inputProps } style = { { height : this . props . toolbar ? 30 : undefined , fontSize : this . props . toolbar ? 15 : undefined } } /> ) ;
147150 }
148151
149152 return newChildren ;
0 commit comments