Skip to main content
Version: 2023.1

foundation-layout.foundationlayout.additem

Home > @genesislcap/foundation-layout > FoundationLayout > addItem

FoundationLayout.addItem() method

Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.

Signature:

addItem(config: RegisteredElementConfig, placement?: Placement): void;

Parameters

ParameterTypeDescription
configRegisteredElementConfigRegisteredElementConfig configuration items for the new pane
placementPlacement(Optional) where to add the new pane on the layout (defaults to the right hand side)

Returns:

void

Exceptions

LayoutRegistrationError if you attempt to add an item before it has been registered

Remarks

Adding a new item invokes the registration previously made explicitly via registerItem() or implicitly via the html declerative API.

The elements added onto the new pane are copies using element.cloneNode() of the original element references used during registration.