diff --git a/src/app/(main)/websites/[websiteId]/events/EventsDataTable.tsx b/src/app/(main)/websites/[websiteId]/events/EventsDataTable.tsx index 49b31656..32eb985c 100644 --- a/src/app/(main)/websites/[websiteId]/events/EventsDataTable.tsx +++ b/src/app/(main)/websites/[websiteId]/events/EventsDataTable.tsx @@ -13,7 +13,7 @@ export default function EventsDataTable({ const queryResult = useWebsiteEvents(websiteId); return ( - + {({ data }) => } ); diff --git a/src/components/common/DataTable.tsx b/src/components/common/DataTable.tsx index 22373f60..d2094329 100644 --- a/src/components/common/DataTable.tsx +++ b/src/components/common/DataTable.tsx @@ -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)} /> )}