Skip to content

Commit 73b11af

Browse files
authored
Set the start to 0 on export
If we don't set the start to 0, if we're press the export button from page > 1, the row index will completely wrong.
1 parent d0d5e12 commit 73b11af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Services/DataTable.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@ protected function mapResponseToColumns($columns, $type)
323323
*/
324324
protected function getAjaxResponseData()
325325
{
326-
$this->request()->merge(['length' => -1]);
326+
$this->request()->merge([
327+
'start' => 0,
328+
'length' => -1
329+
]);
327330

328331
$response = app()->call([$this, 'ajax']);
329332
$data = $response->getData(true);

0 commit comments

Comments
 (0)