GoodData.UI API reference
  • All Products
  • All Products
  • GoodData.UI
  • API Reference
  • University
  • Community
  • Documentation
  • Support
  • 11.1.0
  • Code samples
  • GitHub

addItem()

Home > @gooddata/sdk-ui-dashboard > IFluidLayoutCustomizer > addItem

IFluidLayoutCustomizer.addItem() method

Warning: This API is now obsolete.

Use IFluidLayoutCustomizer.addItemToPath() with itemPath param instead.

Adds a new item containing a custom widget onto the dashboard.

Signature:

addItem(sectionIdx: number, itemIdx: number, item: IDashboardLayoutItem<ICustomWidget>): IFluidLayoutCustomizer;

Parameters

Parameter

Type

Description

sectionIdx

number

index of section where to add the new item

itemIdx

number

index within the section where to add new item; you may specify -1 to add the item at the end of the section

item

IDashboardLayoutItem<ICustomWidget>

item containing custom widget; note: customizer will make a deep copy of the item before adding it onto a dashboard. At this moment, the newly added items are read-only.

Returns:

IFluidLayoutCustomizer

Remarks

New item will be added to an existing section at index sectionIdx and within that section will be placed at itemIdx. The item to add must contain a custom widget data. Attempts to add item that does not contain any widget data will be ignored and warnings will be reported. Keep in mind that this can lead to further errors or problems down the line if you are adding more items at specific indexes into the same section.

Note: new items will be added into existing sections before new sections will be added using the IFluidLayoutCustomizer.addSectionToPath() method. Therefore,

  • IFluidLayoutCustomizer.addItem() method
  • Parameters
  • Remarks
GoodData resources:
  • Documentation
Follow the community:
  • Community
Copyright © 2007–2025 GoodData Corporation. All Rights Reserved. Code licensed under a dual license - CC BY‑NC 4.0 for trial experience and GoodData.UI EULA for commercial use