|
@@ -38,9 +38,10 @@ export default class FormComp extends Module {
|
|
|
//Init
|
|
|
|
|
|
if(!inputsMargin) inputsMargin = 7
|
|
|
+ console.log("@@@@@")
|
|
|
+ console.log(this.props)
|
|
|
|
|
|
-
|
|
|
- let Inputs = Object.keys(inputs).map((key,indx) => {
|
|
|
+ let Inputs = (inputs || []).map((item,indx) => {
|
|
|
let state = {}
|
|
|
return (<TextInput key={indx}
|
|
|
style={[{height: 20, borderColor: 'gray', borderWidth: 1 , marginBottom:inputsMargin},StaticRules.text]}
|
|
@@ -48,9 +49,9 @@ export default class FormComp extends Module {
|
|
|
state[indx] = text;
|
|
|
this.setState(state)}}
|
|
|
value={this.state.key}
|
|
|
- placeholder={inputs[key].placeholder}
|
|
|
- textContentType={inputs[key].textContentType}
|
|
|
- secureTextEntry={ inputs[key].textContentType === "password" ? true :false}
|
|
|
+ placeholder={item.placeholder}
|
|
|
+ textContentType={item.textContentType}
|
|
|
+ secureTextEntry={ item.textContentType === "password" ? true :false}
|
|
|
/>)
|
|
|
})
|
|
|
|
|
@@ -94,7 +95,7 @@ FormComp.Inputs = {
|
|
|
placeholder:"password"
|
|
|
},
|
|
|
],*/
|
|
|
- inputs:new Types.Object().require().default(Inp),
|
|
|
+ inputs:new Types.Array().require().default(Inp),
|
|
|
ButtonText:new Types.Text().require().default('Submit'),
|
|
|
ButtonColor: new Types.Text().require().color().default('rgba(3, 218, 198, 1)'),
|
|
|
backgroundColor: new Types.Text().require().color().default('rgba(0, 140, 186, 1)'),
|