mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fix autofocus on events page
This commit is contained in:
parent
398a665791
commit
b89fb0a962
@ -13,7 +13,7 @@ export default function EventsDataTable({
|
||||
const queryResult = useWebsiteEvents(websiteId);
|
||||
|
||||
return (
|
||||
<DataTable queryResult={queryResult} allowSearch={true}>
|
||||
<DataTable queryResult={queryResult} allowSearch={true} autoFocus={false}>
|
||||
{({ data }) => <EventsTable data={data} />}
|
||||
</DataTable>
|
||||
);
|
||||
|
@ -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)}
|
||||
/>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user