Skip to content

Commit 70b2e93

Browse files
committed
Use same export data if export handler extends DataTablesExportHandler
This PR makes sure that if you're using a custom export handler which extends the default DataTablesExportHandler, it receives the same data that the default export handler would receive. This fixes a BC introduced on commit 45c7faf (see issue #126)
1 parent bf27009 commit 70b2e93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Services/DataTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ protected function buildExcelFile()
433433
return $this->buildFastExcelFile();
434434
}
435435

436-
if ($this->exportClass != DataTablesExportHandler::class) {
436+
if (! is_subclass_of($this->exportClass, DataTablesExportHandler::class)) {
437437
$collection = $this->getAjaxResponseData();
438438

439439
return new $this->exportClass($this->convertToLazyCollection($collection));

0 commit comments

Comments
 (0)