diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-09-02 10:19:31 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-09-02 10:19:31 -0400 |
commit | 86b474666ca0f25af2ddb808fc618517292e865a (patch) | |
tree | 8e5eb00e7d14e115de8874fb6aef2a262528f206 /web/react | |
parent | 31519f7c88d61bc2828275b1be273cd97c8af4bb (diff) | |
download | chat-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')
-rw-r--r-- | web/react/components/access_history_modal.jsx | 9 |
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); |