diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-03-02 16:10:14 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-03 08:47:52 -0500 |
commit | 62c09209430e74fb0863cd998497f6ef1c475342 (patch) | |
tree | 574dac9104fc868e020994144ef87ff589645d1b /web/react/components/more_direct_channels.jsx | |
parent | c2eab07be058d45b586dc4a36546ef0ba8f22792 (diff) | |
download | chat-62c09209430e74fb0863cd998497f6ef1c475342.tar.gz chat-62c09209430e74fb0863cd998497f6ef1c475342.tar.bz2 chat-62c09209430e74fb0863cd998497f6ef1c475342.zip |
Fixed max height for all modals using FilteredUserLists
Diffstat (limited to 'web/react/components/more_direct_channels.jsx')
-rw-r--r-- | web/react/components/more_direct_channels.jsx | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index c85b5e9c5..0814ac1b3 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -48,23 +48,6 @@ export default class MoreDirectChannels extends React.Component { UserStore.removeChangeListener(this.handleUserChange); } - componentDidUpdate(prevProps) { - if (!prevProps.show && this.props.show) { - this.onShow(); - } - } - - onShow() { - // TODO ugh - /*if (Utils.isMobile()) { - $(ReactDOM.findDOMNode(this.refs.modal)).css('max-height', $(window).height() - 250); - } else { - console.log(ReactDOM.findDOMNode(this.refs.modal)); - console.log($(ReactDOM.findDOMNode(this.refs.modal))); - $(ReactDOM.findDOMNode(this.refs.modal)).css('max-height', $(window).height() - 300); - }*/ - } - handleHide() { if (this.props.onModalDismissed) { this.props.onModalDismissed(); @@ -121,6 +104,11 @@ export default class MoreDirectChannels extends React.Component { } render() { + let maxHeight = 1000; + if (Utils.windowHeight() <= 1200) { + maxHeight = Utils.windowHeight() - 300; + } + return ( <Modal dialogClassName='more-modal more-direct-channels' @@ -137,6 +125,7 @@ export default class MoreDirectChannels extends React.Component { </Modal.Header> <Modal.Body> <FilteredUserList + style={{maxHeight}} users={this.state.users} actions={[this.createJoinDirectChannelButton]} /> |