Skip to main content

Interface: CustomRefOptions<T>

Custom reference options.

Type Parameters​

Type Parameter
T extends object

Properties​

getId?​

optional getId?: RefIdResolver;

Must return the ID associated to the given target object, or undefined if it has no ID. If not provided it will try to get the reference id from the model getRefId() method.

Param​

target

Target object.


onResolvedValueChange?​

optional onResolvedValueChange?: RefOnResolvedValueChange<T>;

What should happen when the resolved value changes.

Param​

ref

Reference object.

Param​

newValue

New resolved value.

Param​

oldValue

Old resolved value.


resolve​

resolve: RefResolver<T>;

Must return the resolution for the given reference object.

Param​

ref

Reference object.

Returns​

The resolved object or undefined if it could not be resolved.