Added precautions to avoid incorrect data display to the user by clearing modal after every close
Этот коммит содержится в:
@@ -9,6 +9,9 @@ module.exports = React.createClass({
|
|||||||
handleClose: function() {
|
handleClose: function() {
|
||||||
var townSquare = ChannelStore.getByName("town-square");
|
var townSquare = ChannelStore.getByName("town-square");
|
||||||
utils.switchChannel(townSquare);
|
utils.switchChannel(townSquare);
|
||||||
|
|
||||||
|
$(this.refs.title.getDOMNode()).text("")
|
||||||
|
$(this.refs.body.getDOMNode()).text("");
|
||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
$(this.getDOMNode()).on('hidden.bs.modal',this.handleClose);
|
$(this.getDOMNode()).on('hidden.bs.modal',this.handleClose);
|
||||||
@@ -26,10 +29,10 @@ module.exports = React.createClass({
|
|||||||
<div className="modal-content">
|
<div className="modal-content">
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
<button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 className="modal-title" />
|
<h4 ref="title" className="modal-title" />
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-body">
|
<div className="modal-body">
|
||||||
<p />
|
<p ref="body" />
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
<button type="button" className="btn btn-primary" data-dismiss="modal">Okay</button>
|
<button type="button" className="btn btn-primary" data-dismiss="modal">Okay</button>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user