-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from bcgov/BCAT-540-531-533
BCAT-540 531 | View all page | enable summary page in all status | Also Update the docker-compose to use DB:15
- Loading branch information
Showing
6 changed files
with
91 additions
and
40 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,39 @@ | ||
import { useRouter } from 'next/router'; | ||
import { ChangeEvent } from 'react'; | ||
import { SetQueryParams } from 'services/useQueryParams'; | ||
|
||
const PageSizeSelect = () => { | ||
const router = useRouter(); | ||
const { query, push } = router; | ||
const { limit } = query; | ||
|
||
const handlePageSizeChange = (event: ChangeEvent<HTMLSelectElement>) => { | ||
SetQueryParams(push, query, { ...query, limit: event.target.value }); | ||
}; | ||
|
||
const limits = [ | ||
{ name: 'All', value: '0' }, | ||
{ name: '20', value: '20' }, | ||
{ name: '30', value: '30' }, | ||
{ name: '40', value: '40' }, | ||
{ name: '50', value: '50' }, | ||
]; | ||
return ( | ||
<div> | ||
<select | ||
value={limit} | ||
title='page size select' | ||
onChange={handlePageSizeChange} | ||
className='bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5' | ||
> | ||
{limits.map(({ name, value }) => ( | ||
<option value={value} key={value} selected={limit === value}> | ||
{name} | ||
</option> | ||
))} | ||
</select> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PageSizeSelect; |
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