Hosanna UI API v1.30.2-next
    Preparing search index...

    VirtualNodeFieldObserverManager is a class responsible for managing field observers for web-based SG nodes. It allows adding, removing, and notifying observers of field changes.

    Implements

    Index

    Constructors

    Properties

    The node associated with this observer manager.

    observers: Record<string, FieldObserver[]> = {}

    A record of observers, keyed by field names.

    Methods

    • Notifies observers of a field change and invokes appropriate handlers.

      Parameters

      • fieldName: string

        The name of the field that changed.

      • value: any

        The new value of the field.

      Returns boolean

      true if the observers were notified successfully, otherwise false.

    • Adds an observer to a specific field based on a port or function.

      Parameters

      • fieldName: string

        The name of the field to observe.

      • portOrString: string | Function | ISGROMessagePort

        The message port or function to associate with the observer.

      • OptionalinfoFields: string[]

        Optional fields to observe for additional information.

      Returns boolean

      true if the observer was added successfully, otherwise false.

    • Adds an observer to a specific field with scoped handling for ports or functions.

      Parameters

      • fieldName: string

        The name of the field to observe.

      • portOrString: string | Function | ISGROMessagePort

        The message port, function, or string to associate with the observer.

      • OptionalinfoFields: string[]

        Optional fields to observe for additional information.

      Returns boolean

      true if the observer was added successfully, otherwise false.

    • Removes all observers for a specific field.

      Parameters

      • fieldName: string

        The name of the field to unobserve.

      Returns boolean

      true if the observers were removed successfully, otherwise false.

    • Removes all observers for a specific field with scoped handling.

      Parameters

      • fieldName: string

        The name of the field to unobserve.

      Returns boolean

      true if the observers were removed successfully, otherwise false.