summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings/user_settings_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/user_settings/user_settings_modal.jsx')
-rw-r--r--web/react/components/user_settings/user_settings_modal.jsx15
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}