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() {
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);