Function ctxDispatchToArrayControlProps

  • Parameters

    • dispatch: Dispatch<unknown>

    Returns {
        addItem(path, value): (() => void);
        handleChange(path, value): void;
        moveDown?(path, toMove): (() => void);
        moveUp?(path, toMove): (() => void);
        removeItems?(path, toDelete): (() => void);
    }

    • addItem:function
      • Parameters

        • path: string
        • value: any

        Returns (() => void)

          • (): void
          • Returns void

    • handleChange:function
      • Update handler that emits a data change

        Parameters

        • path: string

          the path to the data to be updated

        • value: any

          the new value that should be written to the given path

        Returns void

    • moveDown?:function
      • Parameters

        • path: string
        • toMove: number

        Returns (() => void)

          • (): void
          • Returns void

    • moveUp?:function
      • Parameters

        • path: string
        • toMove: number

        Returns (() => void)

          • (): void
          • Returns void

    • removeItems?:function
      • Parameters

        • path: string
        • toDelete: number[]

        Returns (() => void)

          • (): void
          • Returns void