IFluidLayoutCustomizer
Set of functions you can use to customize the fluid layout of the dashboard rendered.
export interface IFluidLayoutCustomizer
Methods
Method | Description |
|---|---|
Adds a new item containing a custom widget onto the dashboard. | |
Adds a new item containing a custom widget onto the dashboard. | |
Adds a new section with one or more custom widgets onto the fluid layout. | |
Adds a new section with one or more custom widgets onto the layout even to the nested layout. |
Method details
IFluidLayoutCustomizer.addItem()methodDeprecated
Warning: This API is now obsolete.
Use IFluidLayoutCustomizer.addItemToPath() with itemPath param instead.
Adds a new item containing a custom widget onto the dashboard.
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 | 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
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 theIFluidLayoutCustomizer.addSectionToPath() method. Therefore,
IFluidLayoutCustomizer.addItemToPath()method
Adds a new item containing a custom widget onto the dashboard.
addItemToPath(itemPath: ILayoutItemPath, item: IDashboardLayoutItem<ICustomWidget>): IFluidLayoutCustomizer;
Parameters
Parameter | Type | Description |
|---|---|---|
itemPath | layout path where to add new item | |
item | 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
Remarks
New item will be added to position defined by provided path allowing target also nested layouts/sections. All sections in path already need to exist. 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.addSection method. Therefore,
IFluidLayoutCustomizer.addSection()methodDeprecated
Warning: This API is now obsolete.
Use IFluidLayoutCustomizer.addSectionToPath() with sectionPath param instead.
Adds a new section with one or more custom widgets onto the fluid layout.
addSection(sectionIdx: number, section: IDashboardLayoutSection<ICustomWidget>): IFluidLayoutCustomizer;
Parameters
Parameter | Type | Description |
|---|---|---|
sectionIdx | number | index to add the new section at |
section | section to add; 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
Remarks
The section to add must not be empty - it must contain at least one item. Attempts to add empty sections will be ignored and warnings will be reported.
IFluidLayoutCustomizer.addSectionToPath()method
Adds a new section with one or more custom widgets onto the layout even to the nested layout.
addSectionToPath(sectionPath: ILayoutSectionPath, section: IDashboardLayoutSection<ICustomWidget>): IFluidLayoutCustomizer;
Parameters
Parameter | Type | Description |
|---|---|---|
sectionPath | path in layout to add the new section at | |
section | section to add; 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
Remarks
The section to add must not be empty - it must contain at least one item. Attempts to add empty sections will be ignored and warnings will be reported.