N°4529 - Object list: Count in header not updated when refreshing through the icon

This commit is contained in:
acognet
2022-01-25 10:24:44 +01:00
parent e8e6ceb29e
commit e8448332f4
4 changed files with 18 additions and 5 deletions

View File

@@ -24,7 +24,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
],
{% endif %}
drawCallback: function (settings) {
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
if(settings.json)
{
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
}
// Hiding pagination if only one page
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2)
{