Files
mattermost-mobile/app/components/file_upload_preview/index.js
Harrison Healey dff9628b6e MM-12189 Set autocomplete max height based off available space (#2218)
* MM-12189 Set autocomplete max height based off available space

* Have each autocomplete type determine its own max height since DateSuggestion needs more space

* Remove unused props and ref
2018-10-05 09:58:53 -04:00

24 lines
804 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
import {getDimensions} from 'app/selectors/device';
import {checkForFileUploadingInChannel} from 'app/selectors/file';
import FileUploadPreview from './file_upload_preview';
function mapStateToProps(state, ownProps) {
const {deviceHeight} = getDimensions(state);
return {
channelIsLoading: state.views.channel.loading,
deviceHeight,
filesUploadingForCurrentChannel: checkForFileUploadingInChannel(state, ownProps.channelId, ownProps.rootId),
theme: getTheme(state),
};
}
export default connect(mapStateToProps)(FileUploadPreview);