Files
mattermost-mobile/patches/react-native-elements+2.3.2.patch
2020-11-17 14:20:58 -03: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,
}),