Skip to content

useViewDestroy ​

Overview ​

Provides instance deletion support for a view screen.

Internally loads the instance(s) matching the provided pk, then exposes a handleDelete function that can perform bulk deletion and report errors.

Signature ​

useViewDestroy(props)

Parameters ​

NameTypeRequiredDescription
propsobjectyesThe reactive props object.

props Properties ​

NameTypeRequiredDefaultDescription
appstring
modelstring
pkstring | string[]

Returns ​

ViewDestroyState

An object containing reactive state and the handleDelete function.

Source ​

client/lib/use/useViewDestroy.js:39