react-crud-mobile 1.3.290 → 1.3.292

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.
@@ -778,9 +778,13 @@ function UIInput(props) {
778
778
  var label = scope.getLabel();
779
779
  var placeholder = scope.getPart('placeholder', null, label);
780
780
  var el = scope.original;
781
- var _useState = React.useState(initial),
782
- value = _useState[0],
783
- setValue = _useState[1];
781
+ var element = scope.original;
782
+ var _useState = React.useState(40),
783
+ height = _useState[0],
784
+ setHeight = _useState[1];
785
+ var _useState2 = React.useState(initial),
786
+ value = _useState2[0],
787
+ setValue = _useState2[1];
784
788
  var onChange = function onChange(v) {
785
789
  v = scope.changeValue(v);
786
790
  setValue(v);
@@ -806,20 +810,30 @@ function UIInput(props) {
806
810
  }
807
811
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
808
812
  };
809
- var type = scope.getPart('type', 'none');
813
+ var type = scope.getPart('type', 'text');
810
814
  var decode = {
811
815
  textarea: {
812
816
  multiline: true,
813
817
  textAlignVertical: 'top',
814
- numberOfLines: 5
818
+ numberOfLines: 5,
819
+ style: {
820
+ height: Math.max(40, height)
821
+ }
815
822
  }
816
823
  };
817
- var defs = _extends({}, reactCrudUtils.Utils.nvl(decode[type], {}), scope.original.inputProps);
824
+ var defs = _extends({}, reactCrudUtils.Utils.nvl(decode[type], {}), element.inputProps);
825
+ var inputStyle = _extends({}, style('input', scope.getStyle(type)));
826
+ if (element.autoHeight) {
827
+ defs.onContentSizeChange = function (event) {
828
+ setHeight(event.nativeEvent.contentSize.height);
829
+ };
830
+ inputStyle = _extends({}, inputStyle, defs.style);
831
+ }
818
832
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
819
833
  children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
820
834
  style: style('base'),
821
835
  children: [scope.getPart('left'), /*#__PURE__*/jsxRuntime.jsx(reactNative.TextInput, _extends({
822
- style: style('input'),
836
+ style: inputStyle,
823
837
  onChangeText: onChange,
824
838
  value: value,
825
839
  placeholder: placeholder