AJSF API reference
    Preparing search index...

    Function mapLayout

    • 'mapLayout' function

      Creates a new layout by running each element in an existing layout through an iteratee. Recursively maps within array elements 'items' and 'tabs'. The iteratee is invoked with four arguments: (value, index, layout, path)

      The returned layout may be longer (or shorter) then the source layout.

      If an item from the source layout returns multiple items (as '*' usually will), this function will keep all returned items in-line with the surrounding items.

      If an item from the source layout causes an error and returns null, it is skipped without error, and the function will still return all non-null items.

      // layout - the layout to map // { (v: any, i?: number, l?: any, p?: string) => any } function - the funciton to invoke on each element // { string|string[] = '' } layoutPointer - the layoutPointer to layout, inside rootLayout // { any[] = layout } rootLayout - the root layout, which conatins layout //

      Parameters

      • layout: any
      • fn: any
      • layoutPointer: string = ''
      • rootLayout: any = layout

      Returns any[]