Class UiConfigMethods

Constructors

Properties

undoEditingWaitTime: number = 2000
undoPresets: {
    UiConfigMethods_action: (
        c: ActionCommand,
    ) => { redo: () => Promise<void>; undo: () => Promise<void> };
    UiConfigMethods_set: (
        c: SetValueCommand,
    ) => { redo: () => void; undo: () => void };
} = ...

Methods

  • Type Parameters

    • T

    Parameters

    • config: UiObjectConfig<T>
    • props: {
          config?: UiObjectConfig;
          configPath?: UiObjectConfig[];
          last?: boolean;
          lastValue?: any;
          value?: any;
      }

      only last needs to be set. check the docs for setValue

    Returns Promise<void>

  • Get the value from config

    Type Parameters

    Parameters

    • config: UiObjectConfig<T>
    • val: undefined | T

      existing value, new value can be copied to this if not equal.

    • copyOnEqual: boolean = true

      whether the value should be copied to val if equal. Default is true.

    Returns undefined | T

    The value from the binding, cloned or copied if possible. If the value is equal and copyOnEqual is false, then undefined is returned. this can be used to check if the value is changed

  • Type Parameters

    Parameters

    • config: UiObjectConfig<T>
    • value: T
    • props: {
          config?: UiObjectConfig;
          configPath?: UiObjectConfig[];
          last?: boolean;
          lastValue?: T;
      }

      only the prop last need to be set, rest are optional. lastValue can be set if known (but it should be exactly equal to the value in the binding and not cloned). config, configPath are for parentOnChange, no need to set that.

    • OptionalforceOnChange: boolean
    • trackUndo: boolean = true

    Returns Promise<boolean>

MMNEPVFCICPMFPCPTTAAATR