Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const Instance

Instance: typeof InstanceComponent = ...

Functions

formFieldsToInstanceItem

  • formFieldsToInstanceItem<T>(formFields: Record<string, any>, entityName: string, metadata: MetaClassInfo[], stringIdName?: string): Record<string, any>
  • Transforms the antd Form fields values into format expected by Instance item, which is generally the same as the format expected by REST API, except that Instance item may have the following properties that are stripped before the commit:

    • a temporary id created client-side
    • read-only attributes

    Type parameters

    • T

    Parameters

    Returns Record<string, any>

instance

instanceItemToFormFields

  • instanceItemToFormFields<T>(item: Record<string, any> | undefined, entityName: string, metadata: MetaClassInfo[], displayedProperties?: string[], stringIdName?: string): Record<string, any>
  • Transforms the provided item into the format expected by Ant Design Form fields.

    Type parameters

    • T

      entity type.

    Parameters

    • item: Record<string, any> | undefined

      entity instance to be transformed.

    • entityName: string
    • metadata: MetaClassInfo[]

      entities metadata.

    • Optional displayedProperties: string[]

      entity properties that should be included in the result. If not provided, all properties will be included.

    • Optional stringIdName: string

    Returns Record<string, any>

stripTemporaryIds

  • stripTemporaryIds(item: Record<string, any>): Record<string, any>
  • deprecated

    To be removed from public API

    Parameters

    • item: Record<string, any>

    Returns Record<string, any>

Const useInstance

Const withDataInstance

  • withDataInstance(entityName: string, opts?: DataInstanceOptions): <T>(target: T) => T & IWrappedComponent<unknown>
  • Parameters

    Returns <T>(target: T) => T & IWrappedComponent<unknown>

      • <T>(target: T): T & IWrappedComponent<unknown>
      • Type parameters

        • T: IReactComponent<any>

        Parameters

        • target: T

        Returns T & IWrappedComponent<unknown>

Generated using TypeDoc