diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js index a3bacc509..63733ca13 100644 --- a/js/bootstrap-select.js +++ b/js/bootstrap-select.js @@ -897,7 +897,8 @@ init: function () { var that = this, - id = this.$element.attr('id'); + id = this.$element.attr('id'), + form = this.$element[0].form; selectId++; this.selectId = 'bs-select-' + selectId; @@ -999,6 +1000,14 @@ }); } + if (form) { + $(form).on('reset' + EVENT_KEY, function () { + requestAnimationFrame(function () { + that.render(); + }); + }); + } + setTimeout(function () { that.createLi(); that.$element.trigger('loaded' + EVENT_KEY);