diff options
author | nickago <ngonella@calpoly.edu> | 2015-07-24 09:03:43 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-07-27 14:07:23 -0700 |
commit | 2d8b81170ba80a68865dc6305186a66099d418a2 (patch) | |
tree | 25a24fb5a55c5102073fe85eafa684271e0c2823 /web | |
parent | ed70db18611331de99b2a86b580947e56d0cb7e5 (diff) | |
download | chat-2d8b81170ba80a68865dc6305186a66099d418a2.tar.gz chat-2d8b81170ba80a68865dc6305186a66099d418a2.tar.bz2 chat-2d8b81170ba80a68865dc6305186a66099d418a2.zip |
Added precautions to avoid incorrect data display to the user by clearing modal after every close
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/removed_from_channel_modal.jsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/react/components/removed_from_channel_modal.jsx b/web/react/components/removed_from_channel_modal.jsx index 3a5a58d5e..b815e5d1d 100644 --- a/web/react/components/removed_from_channel_modal.jsx +++ b/web/react/components/removed_from_channel_modal.jsx @@ -9,6 +9,9 @@ module.exports = React.createClass({ handleClose: function() { var townSquare = ChannelStore.getByName("town-square"); utils.switchChannel(townSquare); + + $(this.refs.title.getDOMNode()).text("") + $(this.refs.body.getDOMNode()).text(""); }, componentDidMount: function() { $(this.getDOMNode()).on('hidden.bs.modal',this.handleClose); @@ -26,10 +29,10 @@ module.exports = React.createClass({ <div className="modal-content"> <div className="modal-header"> <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 className="modal-body"> - <p /> + <p ref="body" /> </div> <div className="modal-footer"> <button type="button" className="btn btn-primary" data-dismiss="modal">Okay</button> |