secullum-react-native-ui 4.15.2-beta.2 → 4.15.2-beta.4
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.
|
@@ -83,7 +83,12 @@ class MenuMobile extends React.Component {
|
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
85
|
const theme = (0, theme_1.getTheme)();
|
|
86
|
-
return (React.createElement(react_native_drawer_layout_1.default, { ref: drawer => (this.drawer = drawer), drawerLockMode: this.props.drawerLockMode, drawerBackgroundColor: theme.backgroundColor1, drawerWidth: (0, layout_1.isTablet)() ? 450 : 300, drawerPosition: react_native_drawer_layout_1.default.positions.Left, renderNavigationView: this.renderNavigationView, onDrawerOpen: () => this.setState({ opened: true }),
|
|
86
|
+
return (React.createElement(react_native_drawer_layout_1.default, { ref: drawer => (this.drawer = drawer), drawerLockMode: this.props.drawerLockMode, drawerBackgroundColor: theme.backgroundColor1, drawerWidth: (0, layout_1.isTablet)() ? 450 : 300, drawerPosition: react_native_drawer_layout_1.default.positions.Left, renderNavigationView: this.renderNavigationView, onDrawerOpen: () => this.setState({ opened: true }),
|
|
87
|
+
// When closing the app, we encountered the error 'useInsertionEffect must not schedule updates',
|
|
88
|
+
// because we were trying to update the state during the component render cycle. To avoid this,
|
|
89
|
+
// a setTimeout was introduced with a small delay (enough time to complete the render) before executing other functions.
|
|
90
|
+
// Related issue on GitLab: 11635
|
|
91
|
+
onDrawerClose: () => setTimeout(() => this.setState({ opened: false }), 1) }, this.props.children));
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
exports.MenuMobile = MenuMobile;
|
|
@@ -111,9 +111,9 @@ class RangeDatePicker extends React.Component {
|
|
|
111
111
|
const styles = this.getStyles();
|
|
112
112
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
|
|
113
113
|
React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [styles.container, style] },
|
|
114
|
-
React.createElement(react_native_1.View,
|
|
114
|
+
React.createElement(react_native_1.View, { style: { flex: 1 } },
|
|
115
115
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
116
|
-
React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
|
|
116
|
+
React.createElement(react_native_1.Text, { numberOfLines: 1, style: styles.value }, displayText)),
|
|
117
117
|
React.createElement(FontAwesome_1.default, { name: "calendar", style: styles.icon }),
|
|
118
118
|
react_native_1.Platform.OS !== 'web' &&
|
|
119
119
|
(showStartDateModal ? (React.createElement(react_native_modal_datetime_picker_1.default, { date: startDate, isVisible: true, onConfirm: this.handleStartDateConfirm, onCancel: this.handleStartDateCancel, isDarkModeEnabled: isDarkModeEnabled,
|