mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fix autofocus on events page
This commit is contained in:
parent
398a665791
commit
b89fb0a962
2 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue