react-crud-mobile 1.3.291 → 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.
@@ -769,9 +769,13 @@ function UIInput(props) {
769
769
  var label = scope.getLabel();
770
770
  var placeholder = scope.getPart('placeholder', null, label);
771
771
  var el = scope.original;
772
- var _useState = useState(initial),
773
- value = _useState[0],
774
- setValue = _useState[1];
772
+ var element = scope.original;
773
+ var _useState = useState(40),
774
+ height = _useState[0],
775
+ setHeight = _useState[1];
776
+ var _useState2 = useState(initial),
777
+ value = _useState2[0],
778
+ setValue = _useState2[1];
775
779
  var onChange = function onChange(v) {
776
780
  v = scope.changeValue(v);
777
781
  setValue(v);
@@ -802,15 +806,25 @@ function UIInput(props) {
802
806
  textarea: {
803
807
  multiline: true,
804
808
  textAlignVertical: 'top',
805
- numberOfLines: 5
809
+ numberOfLines: 5,
810
+ style: {
811
+ height: Math.max(40, height)
812
+ }
806
813
  }
807
814
  };
808
- var defs = _extends({}, Utils.nvl(decode[type], {}), scope.original.inputProps);
815
+ var defs = _extends({}, Utils.nvl(decode[type], {}), element.inputProps);
816
+ var inputStyle = _extends({}, style('input', scope.getStyle(type)));
817
+ if (element.autoHeight) {
818
+ defs.onContentSizeChange = function (event) {
819
+ setHeight(event.nativeEvent.contentSize.height);
820
+ };
821
+ inputStyle = _extends({}, inputStyle, defs.style);
822
+ }
809
823
  return /*#__PURE__*/jsxs(Fragment, {
810
824
  children: [/*#__PURE__*/jsxs(View, {
811
825
  style: style('base'),
812
826
  children: [scope.getPart('left'), /*#__PURE__*/jsx(TextInput, _extends({
813
- style: style('input', scope.getStyle(type)),
827
+ style: inputStyle,
814
828
  onChangeText: onChange,
815
829
  value: value,
816
830
  placeholder: placeholder