Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{
"type": "anyComponentStyle",
"maximumWarning": "8kb",
"maximumError": "10kb"
"maximumError": "20kb"
}
],
"fileReplacements": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
</div>
<div class="paginator-container" [class.is-loading]="pagination?.isLoading">
<mat-paginator
class="datasets-paginator datasets-header-paginator"
[pageSizeOptions]="pagination.pageSizeOptions"
[pageIndex]="pagination.pageIndex"
[length]="pagination.length"
Expand Down Expand Up @@ -470,6 +471,7 @@
</div>
<div class="paginator-container" [class.is-loading]="pagination?.isLoading">
<mat-paginator
class="datasets-paginator datasets-footer-paginator"
[pageSizeOptions]="pagination.pageSizeOptions"
[pageIndex]="pagination.pageIndex"
[length]="pagination.length"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,78 @@ cdk-virtual-scroll-viewport {
}
}

mat-paginator {
flex: 1 1 auto;
white-space: nowrap;
min-width: fit-content;
}


// Root level paginator container (bottom of table)
mat-paginator {
//flex: 1 1 auto;
white-space: nowrap;
//min-width: fit-content;
}

::ng-deep mat-paginator.mat-mdc-paginator {
border: 1px solid var(--theme-hover-lighter);
border-radius: 24px;
margin-right: 10px;
margin-bottom: 5px;

/* Target the paginator's form field */
mat-form-field.mat-mdc-form-field.mat-mdc-paginator-page-size-select {
height: 30px !important;
/* Your desired height */
min-height: 30px !important;
}

.paginator-container {
display: flex;
flex: 1;
/* Align the label vertically */
.mat-mdc-paginator-page-size-label {
line-height: 30px;
/* Match the form field height */
padding-top: 0;
padding-bottom: 0;
}

/* Align the select value text vertically */
.mat-mdc-select-value-text {
line-height: 30px;
/* Match the form field height */
padding-top: 0;
padding-bottom: 0;
}

.mat-mdc-select-value {
line-height: 30px !important;
/* Match the form field height */
}

/* Ensure the select trigger fills the height */
.mat-mdc-select-trigger {
height: 100%;
}

/* Adjust the text field wrapper height */
.mat-mdc-text-field-wrapper {
height: 100%;
min-height: 100% !important;
}

/* Remove extra padding from the form field infix */
.mat-mdc-form-field-infix {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
}

.paginator-container {
display: flex;
flex: 1;
height: 48px;
//border: 1px solid var(--theme-hover-lighter);
//border-radius: 24px;
justify-content: flex-end;
align-items: center;
}

.paginator-container.is-loading {
::ng-deep .mat-mdc-paginator-range-label {
position: relative;
Expand All @@ -450,6 +511,38 @@ cdk-virtual-scroll-viewport {
}
}

// Paginator element reordering
// Reorder: Items per page -> Previous -> Page info -> Next
::ng-deep .paginator-container mat-paginator {
display: flex;
align-items: center;
gap: 8px;

.mat-mdc-paginator-page-size {
order: 1;
margin-right: auto;
}

.mat-mdc-paginator-range-actions {
order: 1;
}

.mat-mdc-paginator-navigation-previous,
.mat-mdc-paginator-navigation-first {
order: 1;
}

.mat-mdc-paginator-range-label {
order: 2;
margin: 0;
}

.mat-mdc-paginator-navigation-next,
.mat-mdc-paginator-navigation-last {
order: 3;
}
}

@keyframes paginator-range-spin {
from {
transform: translate(-50%, -50%) rotate(0deg);
Expand Down
Loading