summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_invite_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/channel_invite_modal.jsx')
-rw-r--r--web/react/components/channel_invite_modal.jsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/web/react/components/channel_invite_modal.jsx b/web/react/components/channel_invite_modal.jsx
index 56e2e53f9..7dac39942 100644
--- a/web/react/components/channel_invite_modal.jsx
+++ b/web/react/components/channel_invite_modal.jsx
@@ -61,6 +61,9 @@ export default class ChannelInviteModal extends React.Component {
onShow() {
if ($(window).width() > 768) {
$(ReactDOM.findDOMNode(this.refs.modalBody)).perfectScrollbar();
+ $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 200);
+ } else {
+ $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 150);
}
}
componentDidUpdate(prevProps) {
@@ -103,11 +106,6 @@ export default class ChannelInviteModal extends React.Component {
);
}
render() {
- var maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
-
var inviteError = null;
if (this.state.inviteError) {
inviteError = (<label className='has-error control-label'>{this.state.inviteError}</label>);
@@ -139,11 +137,10 @@ export default class ChannelInviteModal extends React.Component {
onHide={this.props.onHide}
>
<Modal.Header closeButton={true}>
- <Modal.Title>{'Add New Members to '}<span className='name'>{this.props.channel.display_nam}</span></Modal.Title>
+ <Modal.Title>{'Add New Members to '}<span className='name'>{this.props.channel.display_name}</span></Modal.Title>
</Modal.Header>
<Modal.Body
ref='modalBody'
- style={{maxHeight}}
>
{inviteError}
{content}