react-crud-mobile 1.3.12 → 1.3.14

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.
@@ -494,6 +494,7 @@ function UISelect(props) {
494
494
  modalVisible = _useState[0],
495
495
  setModalVisible = _useState[1];
496
496
  var scope = props.scope;
497
+ var element = scope.original;
497
498
  var items = reactCrudUtils.Utils.nvl(scope.getOptions(), []);
498
499
  var placeholder = scope.attr('placeholder', 'Selecione...');
499
500
  var value = scope.getDisplayValue();
@@ -506,7 +507,14 @@ function UISelect(props) {
506
507
  };
507
508
  var onClick = function onClick(_ref) {
508
509
  var value = _ref.value;
509
- scope.changeValue(value);
510
+ var val = value;
511
+ if (element.isObject && val != null && val.object) {
512
+ scope.changeValue(val == null ? void 0 : val.object);
513
+ } else if (val != null && val.value) {
514
+ scope.changeValue(val == null ? void 0 : val.value);
515
+ } else {
516
+ scope.changeValue(value);
517
+ }
510
518
  handlePress();
511
519
  };
512
520
  var style = function style(part, extra) {