Files
mattermost-mobile/patches/react-native-elements+2.3.2.patch
Mattermost Build 07cbd77af0 [MM-32587] [MM32602] Downgrade react-native-elements (#5156) (#5157)
* Downgrade react-native-elements

* Trigger Build

* Update package-lock.json

(cherry picked from commit e4b2183781)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-02-05 11:14:01 -07:00

52 lines
1.6 KiB
Diff

diff --git a/node_modules/react-native-elements/src/searchbar/SearchBar-android.js b/node_modules/react-native-elements/src/searchbar/SearchBar-android.js
index 9ab7ce3..e53034b 100644
--- a/node_modules/react-native-elements/src/searchbar/SearchBar-android.js
+++ b/node_modules/react-native-elements/src/searchbar/SearchBar-android.js
@@ -29,6 +29,12 @@ const defaultClearIcon = (theme) => ({
});
class SearchBar extends Component {
+ componentDidUpdate(prevProps) {
+ if (this.props.value !== prevProps.value) {
+ this.setState({isEmpty: this.props.value === ''});
+ }
+ }
+
focus = () => {
this.input.focus();
};
diff --git a/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js b/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js
index f1ad10d..17cc1e2 100644
--- a/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js
+++ b/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js
@@ -39,6 +39,12 @@ class SearchBar extends Component {
};
}
+ componentDidUpdate(prevProps) {
+ if (this.props.value !== prevProps.value) {
+ this.setState({isEmpty: this.props.value === ''});
+ }
+ }
+
focus = () => {
this.input.focus();
};
@@ -268,7 +274,6 @@ const styles = {
paddingBottom: 13,
paddingTop: 13,
flexDirection: 'row',
- overflow: 'hidden',
alignItems: 'center',
}),
input: {
@@ -279,7 +284,7 @@ const styles = {
borderBottomWidth: 0,
backgroundColor: theme.colors.platform.ios.searchBg,
borderRadius: 9,
- minHeight: 36,
+ minHeight: 30,
marginLeft: 8,
marginRight: 8,
}),