Skip to content

Commit

Permalink
Add form reset when modal is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Feb 21, 2024
1 parent c340758 commit fd9f279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ function initFormControls()
let tomSelect = new TomSelect(el, options);
});

$('.modal').on('hidden.bs.modal', () => $(this).children('form').reset?.());

$('[data-signal]').off('click change').on('click change', function(e) {
if (!this.matches('BUTTON') && e.type == 'click') {
return;
Expand Down

0 comments on commit fd9f279

Please sign in to comment.