From 58527c3c51aa10050f469604fb72ca3f2b1073bc Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Thu, 17 Aug 2023 11:57:29 -0700 Subject: [PATCH 1/3] Set onfocus. --- components/common/SettingsTable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/common/SettingsTable.js b/components/common/SettingsTable.js index a57919f1..e9491331 100644 --- a/components/common/SettingsTable.js +++ b/components/common/SettingsTable.js @@ -41,6 +41,7 @@ export function SettingsTable({ onChange={handleFilterChange} delay={1000} value={filter} + autoFocus={true} placeholder="Search" style={{ maxWidth: '300px', marginBottom: '10px' }} /> From f35a9f0950f540f1edfabd3c261e05813d7ca425 Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Thu, 17 Aug 2023 12:39:58 -0700 Subject: [PATCH 2/3] Add page of intl. --- components/common/Pager.js | 8 ++++++-- lib/constants.ts | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/common/Pager.js b/components/common/Pager.js index 584e0669..4a00590d 100644 --- a/components/common/Pager.js +++ b/components/common/Pager.js @@ -1,7 +1,9 @@ import styles from './Pager.module.css'; import { Button, Flexbox, Icon, Icons } from 'react-basics'; +import useMessages from 'hooks/useMessages'; -export function Pager({ page, pageSize, count, onPageChange, onPageSizeChange }) { +export function Pager({ page, pageSize, count, onPageChange }) { + const { formatMessage, labels } = useMessages(); const maxPage = Math.ceil(count / pageSize); const lastPage = page === maxPage; const firstPage = page === 1; @@ -24,7 +26,9 @@ export function Pager({ page, pageSize, count, onPageChange, onPageSizeChange }) - {`Page ${page} of ${maxPage}`} + + {formatMessage(labels.pageOf, { x: page, y: maxPage })} +