Skip to content

Commit

Permalink
allow form.reset() to work out-of-the-box (#1315)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Aug 12, 2020
1 parent 465676a commit 56f7f1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,14 @@
});
}

if (form) {
$(form).on('reset' + EVENT_KEY, function () {
requestAnimationFrame(function () {
that.render();
});
});
}

setTimeout(function () {
that.buildList();
that.$element.trigger('loaded' + EVENT_KEY);
Expand Down

0 comments on commit 56f7f1e

Please sign in to comment.