Export fileName add function support
@@ -56,6 +56,16 @@ This is an important link to check out as some file types may require extra step
export [options](https://github.com/hhurz/tableExport.jquery.plugin#options) of `tableExport.jquery.plugin`
+ `exportOptions.fileName` can be a string or a function, for example:
+
+ ```js
+ exportOptions: {
+ fileName: function () {
+ return 'exportName'
+ }
+ ```
- **Default:** `{}`
## Column options
@@ -194,6 +194,10 @@ $.BootstrapTable = class extends $.BootstrapTable {
}
})
+ if (typeof o.exportOptions.fileName === 'function') {
+ options.fileName = o.exportOptions.fileName()
this.$el.tableExport($.extend({
onAfterSaveToFile: () => {
if (o.exportFooter) {