From 404c5cc34b23d5644f3a4a6faa87fbf72769a731 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sun, 17 Nov 2024 22:20:28 +1100 Subject: [PATCH] GraphQl 0.2.17.6 - pagination fix --- front/devices.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/front/devices.php b/front/devices.php index e50fbbfd..907464d9 100755 --- a/front/devices.php +++ b/front/devices.php @@ -530,9 +530,13 @@ function initializeDatatable (status) { "dataSrc": function (json) { console.log(json); + // Set the total number of records for pagination + json.recordsTotal = json.devices.count || 0; + json.recordsFiltered = json.devices.count || 0; + return json.devices.devices.map(device => { // Convert each device record into the required DataTable row format - // Order has to be teh same as in the UI_device_columns setting options + // Order has to be the same as in the UI_device_columns setting options const originalRow = [ device.devName || "", device.devOwner || "",