@combeenation/configurator-client
    Preparing search index...

    Class RecordComponent<TName, TKey, TRecord, TInput>

    Represents a component of type Record

    Type Parameters

    • TName extends CmpName = CmpName
    • TKey extends CmpSimpleValue = CmpSimpleValue
    • TRecord extends RecordValue = RecordValue
    • TInput extends RecordValue = TRecord

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    name: string
    zodType: ZodType<unknown>

    Methods

    • Returns Promise<undefined | TRecord[]>

    • Returns the data of a specific record

      Parameters

      • key: TKey

        The key value of the wanted record

      Returns Promise<undefined | TRecord>

      The record (key-value-pair) or undefined if no record with the given key was found

    • Get the key of the currently selected record

      Returns Promise<undefined | TKey>

    • With this function a listener can be assigned which is executed whenever the data of a record component changes

      Parameters

      • listener: CmpRecordsChangedListener<TRecord[]>

        Called whenever the records of the given record cmp has changed

      • callImmediately: boolean = false

        True: The listener is immediately called with the current records of the record cmp at the time, the listener is added
        False: The listener will be called for the first time when the records of the cmp actually change

      Returns void

    • With this function a listener can be assigned which is executed whenever the selected key of a record component changes

      Parameters

      • listener: CmpRecordKeyChangedListener<TKey, TRecord>

        Called whenever the selected key of the given record component has changed

      • callImmediately: boolean = false

        True: The listener is immediately called with the current key and value of the cmp at the time, the listener is added
        False: The listener will be called for the first time when the key of the cmp actually changes

      • Optionalcondition: CmpRecordKeyChangedCondition<TKey, TRecord>

        A predicate function which is given the new cmp key and value.
        The function can decide on whether the listener is called or not by returning true or false.

      Returns void

    • Parameters

      • listener: CmpValueChangedListener<TRecord>

        Called whenever the value of the given cmp has changed

      • callImmediately: boolean = false

        True: The listener is immediately called with the current value of the cmp at the time, the listener is added
        False: The listener will be called for the first time when the value of the cmp actually changes

      • Optionalcondition: CmpValueChangedCondition<TRecord>

        A predicate function which is given the new cmp value.
        The function can decide on whether the listener is called or not by returning true or false.

      Returns void

    • Parameters

      Returns Promise<void>