Closed mvorisek closed 1 year ago
code to reproduce:
$crud = Crud::addTo($app); $crud->setModel(new Country($app->db)); $crud->addJsPaginatorInContainer(20, 500 /* $containerHeight */);
steps to reproduce:
Uncaught Error: Unexpected modal to show - modal is already active
this is because row events registered by table selector are added by the JS paginator AJAX again:
$('#atk_layout_crud_view_table').on('click', '.b_atk_layout_crud_view_table_table_column_actionbuttons_button_1', function (event) { event.preventDefault(); event.stopPropagation(); $('#atk_layout_crud_useraction_modalexecutor').modal('show'); $('#atk_layout_crud_useraction_modalexecutor').data('closeOnLoadingError', true); $('#atk_layout_crud_useraction_modalexecutor_loader').atkReloadView({'url': 'repro.php?__atk_cb_atk_layout_crud_useraction_modalexecutor_loader_callback=callback&__atk_cbtarget=atk_layout_crud_useraction_modalexecutor_loader_callback', 'urlOptions': {'atk_layout_crud_useraction_modalexecutor': $(this).closest('tr').data('id'), 'step': 'fields'}, 'apiConfig': {'method': 'post', 'onSuccess': function () { $('#atk_layout_crud_useraction_modalexecutor').removeData('closeOnLoadingError'); }}, 'storeName': null}); });
code to reproduce:
steps to reproduce:
Uncaught Error: Unexpected modal to show - modal is already active
console errorthis is because row events registered by table selector are added by the JS paginator AJAX again: