fix table limit

This commit is contained in:
vedatakd 2022-02-03 18:22:19 +03:00
parent 6fbe43a444
commit 00072a9bc3

View File

@ -36,6 +36,25 @@ let initModal = function () {
}); });
}); });
// Remove onchange event in ajax select field
if ($('.table--ajax').find('.table-limit').length > 0) {
$('.table--ajax').find('.table-limit').removeAttr("onchange");
}
// Handle ajax select in modals.
$('.table--ajax .table-limit').on('change', function (e) {
e.preventDefault();
let wrapper = $(this).closest('.modal-content');
wrapper.append(loading);
$.get($(this).val(), function (html) {
wrapper.html(html);
});
});
// Handle ajax forms in modals. // Handle ajax forms in modals.
modal.on('submit', 'form.ajax', function (e) { modal.on('submit', 'form.ajax', function (e) {