diff --git a/app/components/autocomplete/autocomplete.js b/app/components/autocomplete/autocomplete.js
index ab05feabe..09555c7a6 100644
--- a/app/components/autocomplete/autocomplete.js
+++ b/app/components/autocomplete/autocomplete.js
@@ -34,6 +34,7 @@ export default class Autocomplete extends PureComponent {
valueEvent: PropTypes.string,
cursorPositionEvent: PropTypes.string,
nestedScrollEnabled: PropTypes.bool,
+ expandDown: PropTypes.bool,
};
static defaultProps = {
@@ -160,32 +161,34 @@ export default class Autocomplete extends PureComponent {
}
render() {
- const style = getStyleFromTheme(this.props.theme);
+ const {theme, isSearch, expandDown} = this.props;
+ const style = getStyleFromTheme(theme);
- const wrapperStyle = [];
- const containerStyle = [];
- if (this.props.isSearch) {
- wrapperStyle.push(style.base, style.searchContainer);
- containerStyle.push(style.content);
+ const wrapperStyles = [];
+ const containerStyles = [];
+ if (isSearch) {
+ wrapperStyles.push(style.base, style.searchContainer);
+ containerStyles.push(style.content);
} else {
- containerStyle.push(style.base, style.container);
+ const containerStyle = expandDown ? style.containerExpandDown : style.container;
+ containerStyles.push(style.base, containerStyle);
}
// We always need to render something, but we only draw the borders when we have results to show
const {atMentionCount, channelMentionCount, emojiCount, commandCount, dateCount, cursorPosition, value} = this.state;
if (atMentionCount + channelMentionCount + emojiCount + commandCount + dateCount > 0) {
if (this.props.isSearch) {
- wrapperStyle.push(style.bordersSearch);
+ wrapperStyles.push(style.bordersSearch);
} else {
- containerStyle.push(style.borders);
+ containerStyles.push(style.borders);
}
}
const maxListHeight = this.maxListHeight();
return (
-
-
+
+
{
container: {
bottom: 0,
},
+ containerExpandDown: {
+ top: 0,
+ },
content: {
flex: 1,
},
diff --git a/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap b/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap
index a79dc98cd..3449acd20 100644
--- a/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap
+++ b/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap
@@ -11,6 +11,8 @@ exports[`EditChannelInfo should match snapshot 1`] = `
extraScrollHeight={0}
keyboardOpeningTime={250}
keyboardShouldPersistTaps="always"
+ onKeyboardDidHide={[Function]}
+ onKeyboardDidShow={[Function]}
style={
Object {
"backgroundColor": "#ffffff",
@@ -199,6 +201,7 @@ exports[`EditChannelInfo should match snapshot 1`] = `
-
-
+
+
)}
-
+
-
-
+
+