File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,23 @@ $schedule->command('datatables:purge-export')->weekly();
88
88
You can set the export filename by setting the property.
89
89
90
90
``` html
91
-
92
91
<livewire:export-button :table-id =" $dataTable->getTableId()" filename =" my-table.xlsx" />
93
92
<livewire:export-button :table-id =" $dataTable->getTableId()" filename =" my-table.csv" />
94
93
95
94
<livewire:export-button :table-id =" $dataTable->getTableId()" :filename =" $filename" />
96
95
```
97
96
97
+ ## Export Button Name
98
+
99
+ You can set the export button name by setting the ` buttonName ` property.
100
+
101
+ ``` html
102
+ <!-- Examples demonstrating how to customize the button name for different scenarios -->
103
+ <livewire:export-button :table-id =" $dataTable->getTableId()" type =" xlsx" buttonName =" Export Excel" />
104
+ <livewire:export-button :table-id =" $dataTable->getTableId()" type =" csv" buttonName =" Export CSV" />
105
+
106
+ ```
107
+
98
108
## Export Type
99
109
100
110
You can set the export type by setting the property to ` csv ` or ` xlsx ` . Default value is ` xlsx ` .
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ class ExportButtonComponent extends Component
25
25
26
26
public string $ filename = '' ;
27
27
28
+ public string $ buttonName = 'Export ' ;
29
+
28
30
public string $ sheetName = 'Sheet1 ' ;
29
31
30
32
public bool $ autoDownload = false ;
Original file line number Diff line number Diff line change 10
10
searchParams.set('action', 'exportQueue');
11
11
searchParams.set('exportType', '{{ $fileType } } ');
12
12
searchParams.set('sheetName', '{{ $sheetName } } ');
13
+ searchParams.set('buttonName', '{{ $buttonName } } ');
13
14
searchParams.set('emailTo', '{{ urlencode ($emailTo )} } ');
14
15
15
16
var tableParams = $.param(oTable.ajax.params());
35
36
x-ref =" exportBtn"
36
37
:disabled =" $wire.exporting"
37
38
class =" {{ $class } }"
38
- >Export
39
+ >{{ $buttonName } }
39
40
</button >
40
41
</form >
41
42
You can’t perform that action at this time.
0 commit comments