File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class LivewireDatatable extends Component
5050 public $ times ;
5151 public $ searchable ;
5252 public $ exportable ;
53+ public $ export_name ;
5354 public $ hideable ;
5455 public $ params ;
5556 public $ selected = [];
@@ -183,6 +184,7 @@ public function mount(
183184 $ hidePagination = null ,
184185 $ perPage = null ,
185186 $ exportable = false ,
187+ $ export_name = null ,
186188 $ hideable = false ,
187189 $ beforeTableSlot = false ,
188190 $ afterTableSlot = false ,
@@ -1550,7 +1552,7 @@ public function export()
15501552 })->all ();
15511553 });
15521554
1553- return Excel::download (new DatatableExport ($ results ), 'DatatableExport.xlsx ' );
1555+ return Excel::download (new DatatableExport ($ results ), $ this -> export_name ? $ this -> export_name . ' .xlsx ' : 'DatatableExport.xlsx ' );
15541556 }
15551557
15561558 public function getQuery ($ export = false )
You can’t perform that action at this time.
0 commit comments