-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds validation and error handling fixes tests adds modal warning prior to delete changes removal button to words instead of only icons code review change requests removing unused className formatting autofill moderator synonym eventId selector adding create sad path test removing feature flag check adding a 3 second debounce
- Loading branch information
Showing
8 changed files
with
772 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { useSubmit } from '@remix-run/react' | ||
import { Select } from '@trussworks/react-uswds' | ||
|
||
import GCNPagination from './GCNPagination' | ||
|
||
export default function PaginationSelectionFooter({ | ||
page, | ||
totalPages, | ||
limit, | ||
query, | ||
form, | ||
}: { | ||
page: number | ||
totalPages: number | ||
limit?: number | ||
query?: string | ||
form: string | ||
}) { | ||
const submit = useSubmit() | ||
return ( | ||
<div className="display-flex flex-row flex-wrap"> | ||
<div className="display-flex flex-align-self-center margin-right-2 width-auto"> | ||
<div> | ||
<Select | ||
id="limit" | ||
title="Number of results per page" | ||
className="width-auto height-5 padding-y-0 margin-y-0" | ||
name="limit" | ||
defaultValue="100" | ||
form={form} | ||
onChange={({ target: { form } }) => { | ||
submit(form) | ||
}} | ||
> | ||
<option value="10">10 / page</option> | ||
<option value="20">20 / page</option> | ||
<option value="50">50 / page</option> | ||
<option value="100">100 / page</option> | ||
</Select> | ||
</div> | ||
</div> | ||
<div className="display-flex flex-fill"> | ||
{totalPages > 1 && ( | ||
<GCNPagination | ||
query={query} | ||
page={page} | ||
limit={limit} | ||
totalPages={totalPages} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.