Skip to content

shownNodes ​

Gives the layout nodes to render when some fields are hidden, by a function that says whether a field is shown.

ts
const nodes = shownNodes(nodes, indexes, isShown)

Parameters ​

  • nodes readonly LayoutNode[]
  • indexes readonly number[]: of the list items the nodes are in, outermost first
  • isShown (node: FieldNode, indexes: readonly number[]) => boolean

Explanation ​

  • A hidden field drops out, with every field inside it.
  • A group, a section or a row whose fields are all hidden drops out too, even when it holds text. One with no field with a value at all, only text, stays.
  • A row's other cells keep their spans and line up from its first column: a row is one line, so no field moves to another.
  • A list's items aren't looked into: call it for each item, with its indexes.

For the conditions of extensions, use the visibility state's shownNodes, which also leaves out what the conditions hide.

Returns ​

Types ​

Functions ​