From 0b52e85ba73e5b3badeb1703462c5d05d3a7d224 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 10 Nov 2015 10:20:16 -0500
Subject: Added Modal base class that extends ReactBootstrap.Modal

---
 web/react/components/access_history_modal.jsx | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'web/react/components/access_history_modal.jsx')

diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx
index ab5686720..6a10f87b2 100644
--- a/web/react/components/access_history_modal.jsx
+++ b/web/react/components/access_history_modal.jsx
@@ -1,7 +1,7 @@
 // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
 // See License.txt for license information.
 
-var Modal = ReactBootstrap.Modal;
+var Modal = require('./modal.jsx');
 var UserStore = require('../stores/user_store.jsx');
 var ChannelStore = require('../stores/channel_store.jsx');
 var AsyncClient = require('../utils/async_client.jsx');
@@ -15,7 +15,6 @@ export default class AccessHistoryModal extends React.Component {
         this.onAuditChange = this.onAuditChange.bind(this);
         this.handleMoreInfo = this.handleMoreInfo.bind(this);
         this.onHide = this.onHide.bind(this);
-        this.onShow = this.onShow.bind(this);
         this.formatAuditInfo = this.formatAuditInfo.bind(this);
         this.handleRevokedSession = this.handleRevokedSession.bind(this);
 
@@ -44,11 +43,6 @@ export default class AccessHistoryModal extends React.Component {
     componentDidMount() {
         UserStore.addAuditsChangeListener(this.onAuditChange);
     }
-    componentDidUpdate(prevProps) {
-        if (this.props.show && !prevProps.show) {
-            this.onShow();
-        }
-    }
     componentWillUnmount() {
         UserStore.removeAuditsChangeListener(this.onAuditChange);
     }
@@ -391,6 +385,7 @@ export default class AccessHistoryModal extends React.Component {
             <Modal
                 show={this.props.show}
                 onHide={this.onHide}
+                onShow={this.onShow}
                 bsSize='large'
             >
                 <Modal.Header closeButton={true}>
-- 
cgit v1.2.3-1-g7c22

