From 70de0125abdc84d70580f82b29a4314e3515a587 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 17 Nov 2015 16:10:16 -0500
Subject: Removed Modal base class

---
 .../components/user_settings/user_settings_modal.jsx      | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'web/react/components/user_settings/user_settings_modal.jsx')

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}
-- 
cgit v1.2.3-1-g7c22

