muba-input-text 5.0.1 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/InputText.js +5 -3
- package/InputTextStyles.js +4 -0
- package/package.json +1 -1
package/InputText.js
CHANGED
@@ -96,7 +96,9 @@ export default class InputText extends React.Component {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
|
99
|
-
|
99
|
+
if (this.props.required || this.props.value != null) {
|
100
|
+
result = this.validateType() && result;
|
101
|
+
}
|
100
102
|
}
|
101
103
|
|
102
104
|
return result;
|
@@ -250,10 +252,10 @@ export default class InputText extends React.Component {
|
|
250
252
|
<View style={{ marginTop: 10 }} />
|
251
253
|
}
|
252
254
|
|
253
|
-
<View style={inputTextStyles.row} collapsable={false}>
|
255
|
+
<View style={(isRTL() && (this.props.language == null || this.props.language == 'AR')) || (!isRTL() && (this.props.language == null || this.props.language != 'AR')) ? inputTextStyles.row : inputTextStyles.rowReverse} collapsable={false}>
|
254
256
|
<TextInput
|
255
257
|
ref={(input) => { this.input = input; }}
|
256
|
-
style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: isRTL() || this.props.language == 'AR' ? 'right' : 'left' }, this.state.fieldError && !this.props.label ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']}
|
258
|
+
style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: (isRTL() && (this.props.language == null || this.props.language == 'AR')) || this.props.language == 'AR' ? 'right' : 'left' }, this.state.fieldError && !this.props.label ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']}
|
257
259
|
underlineColorAndroid='transparent'
|
258
260
|
keyboardType={this.props.keyboardType ? this.props.keyboardType : keyboardTypeMap[this.props.type ? this.props.type : 'default']}
|
259
261
|
onChangeText={(text) => this.onChangeText(text)}
|
package/InputTextStyles.js
CHANGED