Remove getDOMNode usage and self assign in access_modal_history.jsx

Этот коммит содержится в:
JoramWilander
2015-09-02 10:19:31 -04:00
родитель 31519f7c88
Коммит 86b474666c

Просмотреть файл

@@ -23,15 +23,14 @@ export default class AccessHistoryModal extends React.Component {
} }
componentDidMount() { componentDidMount() {
UserStore.addAuditsChangeListener(this.onAuditChange); 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(); AsyncClient.getAudits();
}); });
var self = this; $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function hide() {
$(this.refs.modal.getDOMNode()).on('hidden.bs.modal', function hide() {
$('#user_settings').modal('show'); $('#user_settings').modal('show');
self.setState({moreInfo: []}); this.setState({moreInfo: []});
}); }.bind(this));
} }
componentWillUnmount() { componentWillUnmount() {
UserStore.removeAuditsChangeListener(this.onAuditChange); UserStore.removeAuditsChangeListener(this.onAuditChange);