Skip to content

Commit

Permalink
fix: pagination default pagesize is set to 250 and error message update
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandru-HM authored and diehbria committed Nov 21, 2023
1 parent 21dcb51 commit 3a2d632
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ export interface SearchQueryInputProps {

export function SearchQueryInput({ control }: SearchQueryInputProps) {
const MIN_SEARCH_QUERY_LENGTH = 1;
const MAX_SEARCH_QUERY_LENGTH = 18;
const MAX_SEARCH_QUERY_LENGTH = 48;

return (
<Controller
control={control}
name='searchQuery'
rules={{
required: 'Search query is required.',
required: 'Search query must be between 1 and 48 characters.',
minLength: { value: MIN_SEARCH_QUERY_LENGTH, message: 'Search query is too short.' },
maxLength: { value: MAX_SEARCH_QUERY_LENGTH, message: 'Search query is too long.' },
}}
render={({ field, fieldState }) => (
<FormField
label='Search query'
description='Enter a query to search for modeled data streams.'
description='Enter a query using character string or wildcard character % to search the data.'
errorText={fieldState.error?.message}
constraintText={`Must be between ${MIN_SEARCH_QUERY_LENGTH} and ${MAX_SEARCH_QUERY_LENGTH} characters.`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type CollectionPreferencesProps } from '@cloudscape-design/components/c
import useLocalStorage from 'react-use/lib/useLocalStorage';

const DEFAULT_PREFERENCES = {
pageSize: 10,
pageSize: 250,
wrapLines: true,
stripedRows: false,
stickyColumns: { first: 1 },
Expand Down

0 comments on commit 3a2d632

Please sign in to comment.