Interface CustomRefOptions<T>

Custom reference options.

interface CustomRefOptions<T> {
    getId?: RefIdResolver;
    onResolvedValueChange?: RefOnResolvedValueChange<T>;
    resolve: RefResolver<T>;
}

Type Parameters

  • T extends object

Properties

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?: 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: 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.