GitHub

DaffCollection

interface

import { DaffCollection } from '@daffodil/core'

A collection of items that is paginable, sortable, and filterable.

interface DaffCollection<T extends DaffIdentifiable = DaffIdentifiable> {
  metadata: DaffCollectionMetadata
  data: Record<T["id"], T>
}

Properties

metadata
DaffCollectionMetadata

The collection metadata that contains info about the collection. Includes page, sorting, filtering, and total number of items.

data
Record

The current page of items according to the sorting and filtering.