mobx-keystone
    Preparing search index...

    Interface CustomRefOptions<T>

    Custom reference options.

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

    Type Parameters

    • T extends object
    Index

    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.

    Target object.

    onResolvedValueChange?: RefOnResolvedValueChange<T>

    What should happen when the resolved value changes.

    Reference object.

    New resolved value.

    Old resolved value.

    resolve: RefResolver<T>

    Must return the resolution for the given reference object.

    Reference object.

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