Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/ListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ type ListPageProps = {
searchValue?: string
onSearchChange?: (value: string) => void
searchPlaceholder?: string
/** Overrides default aria-label on the search input when server search is customized */
searchAriaLabel?: string
}

export const ListPage: React.FC<ListPageProps> = ({
Expand All @@ -150,6 +152,7 @@ export const ListPage: React.FC<ListPageProps> = ({
searchValue,
onSearchChange,
searchPlaceholder,
searchAriaLabel,
}) => {
if (!exportProps) {
exportProps = { pageSize: 1000 }
Expand Down Expand Up @@ -303,9 +306,10 @@ export const ListPage: React.FC<ListPageProps> = ({
sx={{ fontSize: 14, flex: 1 }}
inputProps={{
'aria-label':
searchMode === 'server'
searchAriaLabel ??
(searchMode === 'server'
? 'Search all records'
: 'Filter rows on this page',
: 'Filter rows on this page'),
}}
/>
</Box>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/ocotillo/thing/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const WellList: React.FC = () => {
meta: {
params: {
include_contacts: true,
...(search ? { query: search } : {}),
...(search ? { name_contains: search } : {}),
},
},
pagination: { pageSize: 50 },
Expand Down Expand Up @@ -317,6 +317,8 @@ export const WellList: React.FC = () => {
searchMode="server"
searchValue={searchInput}
onSearchChange={setSearchInput}
searchPlaceholder="Search by well name"
searchAriaLabel="Search wells by well name"
/>
)
}
Loading