Skip to content

Commit

Permalink
Merge pull request #335 from Breeding-Insight/bug/BI-1799-import
Browse files Browse the repository at this point in the history
BI-1799 - Updated Germplasm Import Preview Pagination
  • Loading branch information
mlm483 authored Oct 5, 2023
2 parents a194708 + a0f2d84 commit 8853c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/views/import/ImportGermplasm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
v-bind:import-type-name="'Germplasm'"
v-bind:confirm-import-state="confirmImportState"
v-bind:userInput="germplasmList"
v-bind:initial-page-size="200"
v-on="$listeners"
v-on:finished="importFinished"
>
Expand Down Expand Up @@ -95,6 +96,7 @@
v-bind:pagination="previewData.pagination"
v-bind:rowClasses="constructRowClasses(previewData.import)"
v-on:show-error-notification="$emit('show-error-notification', $event)"
v-bind:is-show-all-enabled="false"
>
<b-table-column v-slot="props" :th-attrs="(column) => ({scope:'col'})">
<AlertTriangleIcon
Expand Down Expand Up @@ -243,6 +245,5 @@ export default class ImportGermplasm extends ProgramsBase {
return displayPedigree;

}

}
</script>
5 changes: 4 additions & 1 deletion src/views/import/ImportTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ export default class ImportTemplate extends ProgramsBase {
@Prop()
userInput!: any;

@Prop({default: 10})
initialPageSize!: number;

private systemImportTemplateId!: string;
private currentImport?: ImportResponse = new ImportResponse({});
private previewData: any[] = [];
Expand Down Expand Up @@ -502,7 +505,7 @@ export default class ImportTemplate extends ProgramsBase {
this.importService.send(ImportEvent.IMPORT_SUCCESS);
// TODO: Temp pagination
this.pagination.totalCount = previewResponse.preview.rows.length;
this.pagination.pageSize = 10;
this.pagination.pageSize = this.initialPageSize;
this.pagination.currentPage = 1;
this.pagination.totalPages = this.pagination.totalCount.valueOf() / this.pagination.pageSize.valueOf();
}
Expand Down

0 comments on commit 8853c48

Please sign in to comment.