summaryrefslogtreecommitdiffstats
path: root/web/react/components/access_history_modal.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-02 10:19:31 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-02 10:19:31 -0400
commit86b474666ca0f25af2ddb808fc618517292e865a (patch)
tree8e5eb00e7d14e115de8874fb6aef2a262528f206 /web/react/components/access_history_modal.jsx
parent31519f7c88d61bc2828275b1be273cd97c8af4bb (diff)
downloadchat-86b474666ca0f25af2ddb808fc618517292e865a.tar.gz
chat-86b474666ca0f25af2ddb808fc618517292e865a.tar.bz2
chat-86b474666ca0f25af2ddb808fc618517292e865a.zip
Remove getDOMNode usage and self assign in access_modal_history.jsx
Diffstat (limited to 'web/react/components/access_history_modal.jsx')
-rw-r--r--web/react/components/access_history_modal.jsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx
index bdf9bd9a4..9c8e7c6c3 100644
--- a/web/react/components/access_history_modal.jsx
+++ b/web/react/components/access_history_modal.jsx
@@ -23,15 +23,14 @@ export default class AccessHistoryModal extends React.Component {
}
componentDidMount() {
UserStore.addAuditsChangeListener(this.onAuditChange);
- $(this.refs.modal.getDOMNode()).on('shown.bs.modal', function show() {
+ $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', function show() {
AsyncClient.getAudits();
});
- var self = this;
- $(this.refs.modal.getDOMNode()).on('hidden.bs.modal', function hide() {
+ $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function hide() {
$('#user_settings').modal('show');
- self.setState({moreInfo: []});
- });
+ this.setState({moreInfo: []});
+ }.bind(this));
}
componentWillUnmount() {
UserStore.removeAuditsChangeListener(this.onAuditChange);