ComponentsCollectionCollectionView

CollectionView

A collection view is a component that renders a collection based on its status

Examples

Error

Error with custom messages

Error with action

Empty

Empty with custom messages

Empty with action

Not found

Not found with custom messages

Unauthorized

Unauthorized with custom messages

Required props

status

Represents the status of a collection and indicates what should be rendered

type
ready
error
loading
empty
not-found
unauthorized
default
ready

Optional props

onError

On status error action callback

type
(() => void)
default
null

onEmpty

On status empty action callback

type
(() => void)
default
null

messages

Collection internal messages

type
Partial<{ not-found-heading: string; not-found-description: string; empty-heading: string; empty-description: string; empty-action: string; error-heading: string; error-action: string; unauthorized-heading: string; unauthorized-description: string; }>
default
null