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

This commit is contained in:
acognet
2022-01-25 08:54:40 +01:00
parent 1f42f897d8
commit e8e6ceb29e
4 changed files with 14 additions and 6 deletions

View File

@@ -23,7 +23,8 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{orderable: false, targets: 0}
],
{% endif %}
drawCallback: function () {
drawCallback: function (settings) {
$(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)
{