Skip to content

Commit

Permalink
set default export fromat to excel
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed May 17, 2024
1 parent 4a6e7a3 commit 741459e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/services/crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,13 @@ export default class CrudService extends Service {
title: `Export ${pluralize(modelName)}`,
acceptButtonText: 'Download',
modalClass: 'modal-sm',
format: 'xlsx',
formatOptions: ['csv', 'xlsx', 'xls', 'html', 'pdf'],
setFormat: ({ target }) => {
this.modalsManager.setOption('format', target.value || null);
},
confirm: (modal, done) => {
const format = modal.getOption('format') || 'xlsx';
const format = modal.getOption('format') ?? 'xlsx';
modal.startLoading();
return this.fetch
.download(
Expand Down

0 comments on commit 741459e

Please sign in to comment.