react-crud-mobile 1.3.13 → 1.3.15

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.
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useRef, useContext, useLayoutEffect, createContext } from 'react';
2
- import { Utils, ScopeUtils, CrudUtils, useTheme, ViewUtils, ComponentUtils, HtmlUtils, ThemeUtils } from 'react-crud-utils';
2
+ import { Utils, ScopeUtils, CrudUtils, ViewUtils, ComponentUtils, HtmlUtils, ThemeUtils, useTheme } from 'react-crud-utils';
3
3
  import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, StatusBar, SafeAreaView, Switch, TextInput, Platform, Dimensions, ScrollView, Alert, Image, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
4
4
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
  import Ionicons from '@expo/vector-icons/Ionicons';
@@ -490,8 +490,8 @@ function UISelect(props) {
490
490
  var items = Utils.nvl(scope.getOptions(), []);
491
491
  var placeholder = scope.attr('placeholder', 'Selecione...');
492
492
  var value = scope.getDisplayValue();
493
- var theme = useTheme();
494
493
  var main = ViewUtils.getCrud('view');
494
+ var theme = scope.getTheme();
495
495
  var handlePress = function handlePress() {
496
496
  var _modalVisible = !modalVisible;
497
497
  main.data.selectIsOpen = _modalVisible;
@@ -502,6 +502,8 @@ function UISelect(props) {
502
502
  var val = value;
503
503
  if (element.isObject && val != null && val.object) {
504
504
  scope.changeValue(val == null ? void 0 : val.object);
505
+ } else if (val != null && val.value) {
506
+ scope.changeValue(val == null ? void 0 : val.value);
505
507
  } else {
506
508
  scope.changeValue(value);
507
509
  }
@@ -584,16 +586,14 @@ var styles$3 = /*#__PURE__*/StyleSheet.create({
584
586
  selectLabel: {
585
587
  flex: 1
586
588
  },
589
+ modalTop: {
590
+ backgroundColor: 'primary',
591
+ width: '100%'
592
+ },
587
593
  modalSafe: {
588
594
  flex: 1,
589
- backgroundColor: 'background',
590
- paddingTop: StatusBar.currentHeight || 0
591
- },
592
- modalHeader: {
593
- flexDirection: 'row',
594
- alignItems: 'center',
595
- padding: 15,
596
- backgroundColor: '#6200ea'
595
+ width: '100%',
596
+ backgroundColor: 'background'
597
597
  },
598
598
  modalCloseButton: {
599
599
  padding: 10
@@ -604,17 +604,16 @@ var styles$3 = /*#__PURE__*/StyleSheet.create({
604
604
  },
605
605
  modalTitle: {
606
606
  fontSize: 18,
607
- color: 'white',
608
607
  fontWeight: 'bold',
609
608
  marginLeft: 10
610
609
  },
611
610
  modalContent: {
612
611
  flex: 1,
613
- width: '100%',
614
- alignSelf: 'flex-start',
615
- flexDirection: 'row',
616
- flexWrap: 'wrap',
617
- padding: 20
612
+ backgroundColor: 'background',
613
+ paddingTop: 10,
614
+ paddingBottom: 10,
615
+ paddingLeft: 15,
616
+ paddingRight: 15
618
617
  }
619
618
  });
620
619