Version: 4.xx.xx
useLogList
Overviewβ
If you need to list audit log events refine provides the useLogList
hook for it, It uses the get
method from auditLogProvider
under the hood.
Usageβ
caution
This hook can only be used if auditLogProvider
's get
method is provided.
import { useLogList } from "@refinedev/core";
const postAuditLogResults = useLogList({
resource: "posts",
});
APIβ
Propertiesβ
Property | Type | Default |
---|---|---|
resource Required | string | Action that it reads from route |
action | string | |
author | Record<string, any> | |
meta | Record<string, any> | |
metaData | MetaDataQuery | |
queryOptions | UseQueryOptions<TData, TError> |
Type Parametersβ
Property | Desription | Type | Default |
---|---|---|---|
TData | Result data of the query. Extends BaseRecord | BaseRecord | BaseRecord |
TError | Custom error object that extends HttpError | HttpError | HttpError |
Return valuesβ
Description | Type |
---|---|
Result of the react-query 's useQuery | UseQueryResult<{ data: TData; }> |