From 86b474666ca0f25af2ddb808fc618517292e865a Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 2 Sep 2015 10:19:31 -0400 Subject: Remove getDOMNode usage and self assign in access_modal_history.jsx --- web/react/components/access_history_modal.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'web/react/components') 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); -- cgit v1.2.3-1-g7c22