Fix autofocus on events page

This commit is contained in:
Francis Cao 2024-08-27 16:28:03 -07:00
parent 398a665791
commit b89fb0a962
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,7 @@ export interface DataTableProps {
searchDelay?: number;
allowSearch?: boolean;
allowPaging?: boolean;
autoFocus?: boolean;
renderEmpty?: () => ReactNode;
children: ReactNode | ((data: any) => ReactNode);
}
@ -24,6 +25,7 @@ export function DataTable({
searchDelay = 600,
allowSearch = true,
allowPaging = true,
autoFocus = true,
renderEmpty,
children,
}: DataTableProps) {
@ -57,7 +59,7 @@ export function DataTable({
value={query}
onSearch={handleSearch}
delay={searchDelay || DEFAULT_SEARCH_DELAY}
autoFocus={true}
autoFocus={autoFocus}
placeholder={formatMessage(labels.search)}
/>
)}