Version: 4.xx.xx
useLogList
Overviewβ
If you need to list audit log events, you can use the useLogList
hook of refine, which 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<TQueryFnData, TError, TData> |
Type Parametersβ
Property | Desription | Type | Default |
---|---|---|---|
TQueryFnData | Result data returned by the query function. Extends BaseRecord | BaseRecord | BaseRecord |
TError | Custom error object that extends HttpError | HttpError | HttpError |
TData | Result data returned by the select function. Extends BaseRecord . If not specified, the value of TQueryFnData will be used as the default value. | BaseRecord | TQueryFnData |
Return valuesβ
Description | Type |
---|---|
Result of the react-query 's useQuery | UseQueryResult<{ data: TData; }> |