fleet/frontend/components/forms/fields/Checkbox
Scott Gress 973fe46c5e
Add pagination to manage automations (#26414)
For #23243 

# Checklist for submitter

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated automated tests
- [ ] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality

## Details

This PR updates the policy Manage Automations modals to support
pagination. Previously, these modals received a list of policies from
the main Manage Policies page, which is itself paginated, so that a user
could only add automations to whatever policies were currently listed on
the Manage Automations page. This PR does some refactoring via the
creation of a new PaginatedList component which:

* accepts a `fetchPage` property it can call to get a page of data, 
* renders the data in a list with checkboxes and optional custom markup
(e.g. dropdowns)
* keeps track of changed ("dirty") items in the list, even across page
changes
* allows parent components to access the list of dirty items via a React
`ref`

For this specific use case, there's also a new `PoliciesPaginatedList`
which implements the `fetchPage` for getting a page of policies, and
adds Save and Cancel buttons. Each of the updated modals uses
`PoliciesPaginatedList` to replace its current code for rendering
policies in a list, and delegates much of the logic around change
tracking to the new components.
2025-02-27 12:43:38 -06:00
..
_styles.scss Fleet UI: Updates to dropdown selected states (#25635) 2025-01-22 10:22:59 -05:00
Checkbox.stories.tsx add figma to storybook and a couple new stories (#11521) 2023-05-09 16:53:43 +01:00
Checkbox.tests.tsx Fleet UI: Consistent behavior for radio buttons, add tests to components (#22901) 2024-10-16 11:37:38 -04:00
Checkbox.tsx Add pagination to manage automations (#26414) 2025-02-27 12:43:38 -06:00
index.ts Pressing Enter on setup's Confirmation page (#1141) 2021-06-18 13:33:45 -07:00