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
Parameter | Type | Description |
---|---|---|
config | RegisteredElementConfig | RegisteredElementConfig configuration items for the new pane |
placement | Placement | (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.