Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-v0.2.10 #43

Merged
merged 8 commits into from
May 17, 2024
Prev Previous commit
set default export fromat to excel
roncodes committed May 17, 2024
commit 741459e7c620da6705000544d5bb3b255cce582e
3 changes: 2 additions & 1 deletion addon/services/crud.js
Original file line number Diff line number Diff line change
@@ -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(