After using Draw method pagination not working properly in Datatable 5

I am using draw() method for dynamic adding data in data table.

After draw we are adding more data in datatable then paging count should be update but page number same it’s not updated in datatable.

Below code we are using for load datatable.

$('#example').DataTable({ lengthChange: false, destroy: true, autoWidth: false, columns: [{ data: 'id', name: 'id' }, { data: 'test1', name: 'test1' }, { data: 'test2', name: 'test2' }], order: [[0, 'asc']], paging: true, pagingType: "full_numbers", pageLength: 10, searching: true, ordering: true, info: true, bAutoWidth:false, bPaginate: true, columnDefs: [{ "targets": 'no-sort', "orderable": false, }], //dom: '<<"pagination-top"lB><t><"pagination-wrap"<"pagination-left"i>p>', language: { "paginate": { "previous": pagination.previous, "next": pagination.next }, } }) .rows .add(dataJson) .order([0, 'asc']) .search('') .draw();

As per image here total 12 records are there and I set per page 10 records.

As per that here 2 page display in pagination but it’s display only 1 page.

enter image description here

When I click on next button then it’s working fine but on page load it’s not working.

Can anyone help me for this issue?

Number of all page should be display here after dynamic data updated in datatable.