this problem driving me crazy now. here sequence , code doing:
i using backbone (chaplin) js, jquery , handlebars
- display table multiple rows in view rendered via handlebar template
- launch bootstrap modal dialog page
fill information, click "save" button on modal dialog.
in button click handler function, insert record table row model data like:
this.model.tabledata.push(new_record);
this.render();
call render refresh view updated model data
result , problem:
- the table refreshed new record
- the modal dialog disappeared
- the view locked greyed out , not respond click anymore.
what issue , how fix? please help!
finally figured out way fix problem. code following:
$('#mymodal').modal('hide'); $('#mymodal').on('hidden.bs.modal', function () { _this.render(); }) basically need wait dialog closed before rendering parent view page. not sure why works. can answer. guess has fired event sequence.
Comments
Post a Comment