Class

useRecords

useRecords

Type Definitions

object

# UseRecordsResult

Result of the useRecords hook. It is a object containing multiple tools you can use in your component

Properties:
Name Type Attributes Description
records Array.<RecordJSON>

Array of records fetched from the backend

loading boolean

loading state

page number

current page (in pagination)

perPage number

perPage limit returned by the backend

total number

total number of pages in for current query

direction 'asc' | 'desc'

sort direction

sortBy string <optional>

field used as a sortBy column

fetchData function

function which triggers fetching the data

View Source adminjs/src/frontend/hooks/use-records/use-records-result.type.ts, line 6