mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
UI – Fix hosts table pagination (#20853)
## #20604 <img width="1511" alt="Screenshot 2024-07-30 at 11 50 20 AM" src="https://github.com/user-attachments/assets/c96ff108-4c3b-436a-8d4b-c3e2099264dd"> <img width="1511" alt="Screenshot 2024-07-30 at 11 50 48 AM" src="https://github.com/user-attachments/assets/63a4596a-dd12-41e3-8c83-f196ac3b3a40"> - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
parent
a33bd65272
commit
d19e5c4a9a
3 changed files with 5 additions and 4 deletions
1
changes/20604-hosts-page-pagination
Normal file
1
changes/20604-hosts-page-pagination
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Fix a bug where hosts page would sometimes allow excess pagination
|
||||
|
|
@ -55,7 +55,7 @@ export const LABEL_SLUG_PREFIX = "labels/";
|
|||
|
||||
export const DEFAULT_SORT_HEADER = "display_name";
|
||||
export const DEFAULT_SORT_DIRECTION = "asc";
|
||||
export const DEFAULT_PAGE_SIZE = 20;
|
||||
export const DEFAULT_PAGE_SIZE = 50;
|
||||
export const DEFAULT_PAGE_INDEX = 0;
|
||||
|
||||
export const getHostSelectStatuses = (isSandboxMode = false) => {
|
||||
|
|
|
|||
|
|
@ -405,8 +405,8 @@ const ManageHostsPage = ({
|
|||
osName,
|
||||
osVersion,
|
||||
vulnerability,
|
||||
page: tableQueryData ? tableQueryData.pageIndex : 0,
|
||||
perPage: tableQueryData ? tableQueryData.pageSize : 50,
|
||||
page: tableQueryData ? tableQueryData.pageIndex : DEFAULT_PAGE_INDEX,
|
||||
perPage: tableQueryData ? tableQueryData.pageSize : DEFAULT_PAGE_SIZE,
|
||||
device_mapping: true,
|
||||
osSettings: osSettingsStatus,
|
||||
diskEncryptionStatus,
|
||||
|
|
@ -1578,7 +1578,7 @@ const ManageHostsPage = ({
|
|||
}
|
||||
defaultPageIndex={page || DEFAULT_PAGE_INDEX}
|
||||
defaultSearchQuery={searchQuery}
|
||||
pageSize={50}
|
||||
pageSize={DEFAULT_PAGE_SIZE}
|
||||
additionalQueries={JSON.stringify(selectedFilters)}
|
||||
inputPlaceHolder={HOSTS_SEARCH_BOX_PLACEHOLDER}
|
||||
actionButton={{
|
||||
|
|
|
|||
Loading…
Reference in a new issue