mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Add (hidden) pagination to list results header (#6234)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { ListFilterModel } from "src/models/list-filter/filter";
|
import { ListFilterModel } from "src/models/list-filter/filter";
|
||||||
import { PaginationIndex } from "../List/Pagination";
|
import { Pagination, PaginationIndex } from "../List/Pagination";
|
||||||
import { ButtonToolbar } from "react-bootstrap";
|
import { ButtonToolbar } from "react-bootstrap";
|
||||||
import { ListViewOptions } from "../List/ListViewOptions";
|
import { ListViewOptions } from "../List/ListViewOptions";
|
||||||
import { PageSizeSelector, SortBySelect } from "../List/ListFilter";
|
import { PageSizeSelector, SortBySelect } from "../List/ListFilter";
|
||||||
@@ -53,6 +53,12 @@ export const ListResultsHeader: React.FC<{
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="pagination-index-container">
|
<div className="pagination-index-container">
|
||||||
|
<Pagination
|
||||||
|
currentPage={filter.currentPage}
|
||||||
|
itemsPerPage={filter.itemsPerPage}
|
||||||
|
totalItems={totalCount}
|
||||||
|
onChangePage={(page) => onChangeFilter(filter.changePage(page))}
|
||||||
|
/>
|
||||||
<PaginationIndex
|
<PaginationIndex
|
||||||
loading={loading}
|
loading={loading}
|
||||||
itemsPerPage={filter.itemsPerPage}
|
itemsPerPage={filter.itemsPerPage}
|
||||||
|
|||||||
@@ -1305,7 +1305,7 @@ input[type="range"].zoom-slider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-results-header {
|
.list-results-header {
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
background-color: $body-bg;
|
background-color: $body-bg;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@@ -1327,6 +1327,18 @@ input[type="range"].zoom-slider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-results-header .pagination-index-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
// hidden by default. Can be shown via css override if needed
|
||||||
|
display: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.list-results-header {
|
.list-results-header {
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
@@ -1342,7 +1354,7 @@ input[type="range"].zoom-slider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
& > div.pagination-index-container {
|
& > div.pagination-index-container {
|
||||||
justify-content: flex-end;
|
align-items: flex-end;
|
||||||
order: 3;
|
order: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1356,6 +1368,10 @@ input[type="range"].zoom-slider {
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > div.pagination-index-container {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user