Skip to content

Commit 317450e

Browse files
authored
Fix organization csv export (#1549)
1 parent f49be45 commit 317450e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

frontend/src/modules/organization/components/list/organization-list-table.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
</transition>
6666

6767
<app-organization-list-toolbar
68+
:pagination="pagination"
6869
@mouseover="onTableMouseover"
6970
@mouseleave="onTableMouseLeft"
7071
/>

frontend/src/modules/organization/components/list/organization-list-toolbar.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ import { DEFAULT_ORGANIZATION_FILTERS } from '@/modules/organization/store/const
9595
import { OrganizationPermissions } from '../../organization-permissions';
9696
import { OrganizationService } from '../../organization-service';
9797
98+
const props = defineProps({
99+
pagination: {
100+
type: Object,
101+
default: () => ({
102+
page: 1,
103+
perPage: 20,
104+
}),
105+
},
106+
});
107+
98108
const { currentUser, currentTenant } = mapGetters('auth');
99109
100110
const organizationStore = useOrganizationStore();
@@ -185,8 +195,8 @@ const handleDoExport = async () => {
185195
const response = await OrganizationService.query({
186196
filter,
187197
orderBy: `${filters.value.order.prop}_${filters.value.order.order === 'descending' ? 'DESC' : 'ASC'}`,
188-
limit: null,
189-
offset: null,
198+
offset: (props.pagination.page - 1) * props.pagination.perPage || 0,
199+
limit: props.pagination.perPage || 20,
190200
});
191201
192202
Excel.exportAsExcelFile(

0 commit comments

Comments
 (0)