useAsyncValue

Source
import { useAsyncValue } from "@prestojs/util";
useAsyncValue<ItemType,IdType>(props)
Source

Arguments:

ArgumentTypeDescription
*
props
An object with the properties below
props.existingValuesItemType[]
props.getId
*props.idnull|IdType
props.onError
props.onSuccess
*props.resolve
props.trigger"MANUAL"|"DEEP"
Returns:
An object with these properties:
PropertyTypeDescription
*errornull|Error
*isLoadingboolean
*reset
*run
*valueReturnItemType|null
useAsyncValue<ItemType,IdType>(props)
Source

Arguments:

ArgumentTypeDescription
*
props
An object with the properties below
props.existingValuesItemType[]
props.getId
*props.idsnull|IdType[]
props.onError
props.onSuccess
*props.resolve
props.trigger"MANUAL"|"DEEP"
Returns:
An object with these properties:
PropertyTypeDescription
*errornull|Error
*isLoadingboolean
*reset
*run
*valueReturnItemType|null

Examples

Single ViewModel record

Multiple ViewModel Records