diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-17 16:10:16 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-17 16:14:00 -0500 |
commit | 70de0125abdc84d70580f82b29a4314e3515a587 (patch) | |
tree | f6e76ac51d8c1534cd61abdcf1224673b25c0f6f /web/react/components/user_settings/user_settings_modal.jsx | |
parent | 3d572be2f3bb0d4b6b2eb83b69a209234f807231 (diff) | |
download | chat-70de0125abdc84d70580f82b29a4314e3515a587.tar.gz chat-70de0125abdc84d70580f82b29a4314e3515a587.tar.bz2 chat-70de0125abdc84d70580f82b29a4314e3515a587.zip |
Removed Modal base class
Diffstat (limited to 'web/react/components/user_settings/user_settings_modal.jsx')
-rw-r--r-- | web/react/components/user_settings/user_settings_modal.jsx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index 85a8d0473..776201295 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -2,7 +2,7 @@ // See License.txt for license information. const ConfirmModal = require('../confirm_modal.jsx'); -const Modal = require('../modal.jsx'); +const Modal = ReactBootstrap.Modal; const SettingsSidebar = require('../settings_sidebar.jsx'); const UserSettings = require('./user_settings.jsx'); @@ -34,6 +34,18 @@ export default class UserSettingsModal extends React.Component { this.requireConfirm = false; } + componentDidMount() { + if (this.props.show) { + this.handleShow(); + } + } + + componentDidUpdate(prevProps) { + if (this.props.show && !prevProps.show) { + this.handleShow(); + } + } + handleShow() { $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 300); if ($(window).width() > 768) { @@ -175,7 +187,6 @@ export default class UserSettingsModal extends React.Component { <Modal dialogClassName='settings-modal' show={this.props.show} - onShow={this.handleShow} onHide={this.handleHide} onExited={this.handleHidden} enforceFocus={this.state.enforceFocus} |