secullum-react-native-ui 4.3.10 → 4.3.11-beta.0

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.
@@ -15,6 +15,7 @@ export interface TextBoxProperties {
15
15
  renderInput?: (props: TextBoxInputProps) => JSX.Element;
16
16
  onSubmitEditing?: () => void;
17
17
  inputRef?: (value: TextInput) => void;
18
+ onPress?: () => void;
18
19
  secureTextEntry?: boolean;
19
20
  multiline?: boolean;
20
21
  keyboardType?: KeyboardType;
@@ -42,7 +42,7 @@ class TextBox extends React.Component {
42
42
  this.renderInput = (props) => React.createElement(react_native_1.TextInput, Object.assign({}, props));
43
43
  }
44
44
  render() {
45
- const { label, style, labelStyle, editable, inputRef, renderInput, icon } = this.props;
45
+ const { label, style, labelStyle, editable, inputRef, renderInput, icon, onPress } = this.props;
46
46
  const styles = this.getStyles();
47
47
  const incomingProps = {
48
48
  nativeID: this.props.nativeID,
@@ -85,9 +85,7 @@ class TextBox extends React.Component {
85
85
  this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
86
86
  }
87
87
  };
88
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => {
89
- this.focus();
90
- } },
88
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()) },
91
89
  React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
92
90
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
93
91
  renderInput
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.3.10",
3
+ "version": "4.3.11-beta.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [