muba-input-text 5.0.0 → 5.0.2
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
@@ -250,10 +250,10 @@ export default class InputText extends React.Component {
|
|
250
250
|
<View style={{ marginTop: 10 }} />
|
251
251
|
}
|
252
252
|
|
253
|
-
<View style={inputTextStyles.row} collapsable={false}>
|
253
|
+
<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
254
|
<TextInput
|
255
255
|
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 } : '']}
|
256
|
+
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
257
|
underlineColorAndroid='transparent'
|
258
258
|
keyboardType={this.props.keyboardType ? this.props.keyboardType : keyboardTypeMap[this.props.type ? this.props.type : 'default']}
|
259
259
|
onChangeText={(text) => this.onChangeText(text)}
|
@@ -271,7 +271,9 @@ export default class InputText extends React.Component {
|
|
271
271
|
selection={this.props.selection}
|
272
272
|
selectionColor={this.props.selectionColor}
|
273
273
|
numberOfLines={this.props.numberOfLines}
|
274
|
-
maxLength={this.props.maxLength}
|
274
|
+
maxLength={this.props.maxLength}
|
275
|
+
onFocus={this.props.onFocus}
|
276
|
+
onBlur={this.props.onBlur} />
|
275
277
|
{this.props.children}
|
276
278
|
|
277
279
|
{this.props.value != null && !this.props.hideCancel ?
|
package/InputTextStyles.js
CHANGED