);
}
}
+
+MemberListTeam.propTypes = {
+ style: React.PropTypes.object
+};
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx
index c85b5e9c53..0814ac1b3e 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 (
diff --git a/web/react/components/team_members_modal.jsx b/web/react/components/team_members_modal.jsx
index dfd48b6141..9bdb16438c 100644
--- a/web/react/components/team_members_modal.jsx
+++ b/web/react/components/team_members_modal.jsx
@@ -3,43 +3,21 @@
import MemberListTeam from './member_list_team.jsx';
import TeamStore from '../stores/team_store.jsx';
+import * as Utils from '../utils/utils.jsx';
import {FormattedMessage} from 'mm-intl';
const Modal = ReactBootstrap.Modal;
export default class TeamMembersModal extends React.Component {
- constructor(props) {
- super(props);
-
- this.onShow = this.onShow.bind(this);
- }
-
- componentDidMount() {
- if (this.props.show) {
- this.onShow();
- }
- }
-
- componentDidUpdate(prevProps) {
- if (this.props.show && !prevProps.show) {
- this.onShow();
- }
- }
-
- onShow() {
- // TODO ugh
- /*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);
- }*/
- }
-
render() {
const team = TeamStore.getCurrent();
+ let maxHeight = 1000;
+ if (Utils.windowHeight() <= 1200) {
+ maxHeight = Utils.windowHeight() - 300;
+ }
+
return (
-
+