Files
mattermost-mobile/patches/react-native-elements+3.4.2.patch
Elias Nahum 10bfc9d604 [Gekidou] update dependencies & use node 16 with npm 7 (#5475)
* [Gekidou] update dependencies & use node 16 with npm 7

* add npm7 circleCI changes

* use react-intl 5.17.7

* fix migration error type
2021-06-22 18:52:58 -04:00

66 lines
3.0 KiB
Diff

diff --git a/node_modules/react-native-elements/dist/searchbar/SearchBar-android.js b/node_modules/react-native-elements/dist/searchbar/SearchBar-android.js
index 1bfd2b4..820ccbc 100644
--- a/node_modules/react-native-elements/dist/searchbar/SearchBar-android.js
+++ b/node_modules/react-native-elements/dist/searchbar/SearchBar-android.js
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
return t;
};
import React, { Component } from 'react';
-import { StyleSheet, View, ActivityIndicator, Keyboard, } from 'react-native';
+import { StyleSheet, View, ActivityIndicator, } from 'react-native';
import { renderNode } from '../helpers';
import Input from '../input/Input';
import Icon from '../icons/Icon';
@@ -74,18 +74,11 @@ class SearchBar extends Component {
this.props.onChangeText(text);
this.setState({ isEmpty: text === '' });
};
- this._keyboardDidHide = () => {
- this.cancel();
- };
const { value = '' } = props;
this.state = {
hasFocus: false,
isEmpty: value ? value === '' : true,
};
- Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
- }
- componentWillUnmount() {
- Keyboard.removeListener('keyboardDidHide', this._keyboardDidHide);
}
render() {
var _a;
diff --git a/node_modules/react-native-elements/dist/searchbar/SearchBar-ios.js b/node_modules/react-native-elements/dist/searchbar/SearchBar-ios.js
index 8fe90be..bb0e071 100644
--- a/node_modules/react-native-elements/dist/searchbar/SearchBar-ios.js
+++ b/node_modules/react-native-elements/dist/searchbar/SearchBar-ios.js
@@ -85,6 +85,11 @@ class SearchBar extends Component {
cancelButtonWidth: null,
};
}
+ componentDidUpdate(prevProps) {
+ if (this.props.value !== prevProps.value) {
+ this.setState({isEmpty: this.props.value === ''});
+ }
+ }
render() {
var _a, _b, _c, _d, _e, _f, _g;
const _h = this.props, { theme, cancelButtonProps, cancelButtonTitle, clearIcon, containerStyle, leftIconContainerStyle, rightIconContainerStyle, inputContainerStyle, inputStyle, placeholderTextColor, showLoading, loadingProps, searchIcon, showCancel } = _h, attributes = __rest(_h, ["theme", "cancelButtonProps", "cancelButtonTitle", "clearIcon", "containerStyle", "leftIconContainerStyle", "rightIconContainerStyle", "inputContainerStyle", "inputStyle", "placeholderTextColor", "showLoading", "loadingProps", "searchIcon", "showCancel"]);
@@ -167,7 +172,6 @@ const styles = StyleSheet.create({
paddingBottom: 13,
paddingTop: 13,
flexDirection: 'row',
- overflow: 'hidden',
alignItems: 'center',
},
input: {
@@ -177,7 +181,7 @@ const styles = StyleSheet.create({
inputContainer: {
borderBottomWidth: 0,
borderRadius: 9,
- minHeight: 36,
+ minHeight: 30,
marginLeft: 8,
marginRight: 8,
},