Panel Parameters
Sections Utils
sectionsUtils.add(section)
Add a new Section.
Added in: v4.9.0
The context.panel.sectionsUtils.add(section)
handler calls the refresh panel.
If you use it in the initial request, don't forget to disable the Synchronize option.
Enabling the Synchronize option and using it together with context.panel.sectionsUtils.add(section)
in the Initial Request will cause the panel to reload constantly.
Usage
context.panel.sectionsUtils.add(section);
Example
context.panel.sectionsUtils.add({
name: "Section 1",
id: "id-s-1",
elements: [],
});
const newSection = {
name: "Section 2",
id: "id-s-2",
elements: ["elem-1", "elem-2"],
};
context.panel.sectionsUtils.add(newSection);
Arguments
section
Object
Section. Each section includename
,id
,elements
Common Section properties
-
name
string. Section name. -
id
string. Section Id. -
elements
Array. Elements ids assign to section. Could Be empty array.
sectionsUtils.update(sections)
Change Sections.
Added in: v4.9.0
The context.panel.sectionsUtils.update(sections)
handler calls the refresh panel.
If you use it in the initial request, don't forget to disable the Synchronize option.
Enabling the Synchronize option and using it together with context.panel.sectionsUtils.update(sections)
in the Initial Request will cause the panel to reload constantly.
Usage
context.panel.sectionsUtils.update(sections);
Example
context.panel.sectionsUtils.update([{ name: "Section 1", id: "id-s-1" }]);
Arguments
sections
Array
Sections. Each section includename
andid
sectionsUtils.remove(id)
Remove Section.
Added in: v4.9.0
The context.panel.sectionsUtils.remove(id)
handler calls the refresh panel.
If you use it in the initial request, don't forget to disable the Synchronize option.
Enabling the Synchronize option and using it together with context.panel.sectionsUtils.remove(id)
in the Initial Request will cause the panel to reload constantly.
Usage
context.panel.removeSection(id);
Example
context.panel.removeSection("id-s-1");
Arguments
id
string. Section id.
sectionsUtils.assign(id,elements)
Assign elements to Section.
Added in: v4.9.0
The context.panel.sectionsUtils.assign(id,elements)
handler calls the refresh panel.
If you use it in the initial request, don't forget to disable the Synchronize option.
Enabling the Synchronize option and using it together with context.panel.sectionsUtils.assign(id,elements)
in the Initial Request will cause the panel to reload constantly.
Usage
context.panel.sectionsUtils.assign(id, elements);
Example
context.panel.sectionsUtils.assign("id-s-1", ["elem-1", "elem-2"]);
Arguments
id
string. Section Id.elements
Array. Array of elements ids
sectionsUtils.unassign(elements)
Unassign elements from Section.
Added in: v4.9.0
The context.panel.sectionsUtils.unassign(elements)
handler calls the refresh panel.
If you use it in the initial request, don't forget to disable the Synchronize option.
Enabling the Synchronize option and using it together with context.panel.sectionsUtils.unassign(elements)
in the Initial Request will cause the panel to reload constantly.
Usage
context.panel.sectionsUtils.unassign(elements);
Example
context.panel.sectionsUtils.unassign(["elem-1", "elem-2"]);
Arguments
elements
Array. Array of elements ids
sectionsUtils.get(id)
Get Section by id. Return Section with elements assign to section.
Added in: v4.9.0
Usage
context.panel.sectionsUtils.get(id);
Example
context.panel.sectionsUtils.get("section-id");
Arguments
id
string. Section Id
sectionsUtils.getAll()
Get All Sections. Return Sections with elements assign to each section.
Added in: v4.9.0
Usage
context.panel.sectionsUtils.getAll();
Example
context.panel.sectionsUtils.getAll();
sectionsUtils.collapse(id)
Collapse Section.
Updated in: v4.9.0
Usage
context.panel.sectionsUtils.collapse(id);
Example
context.panel.sectionsUtils.collapse("section-id");
Arguments
id
string. Section Id
sectionsUtils.expand(id)
Expand Section.
Added in: v4.9.0
Usage
context.panel.sectionsUtils.expand(id);
Example
context.panel.sectionsUtils.expand("section-id");
Arguments
id
string. Section Id
sectionsUtils.toggle(id)
Toggle (Collapse/Expand) Section.
Added in: v4.9.0
Usage
context.panel.sectionsUtils.toggle(id);
Example
context.panel.sectionsUtils.toggle("section-id");
Arguments
id
string. Section Id
sectionsUtils.expandedState
Returns Expand/Collapse State for Sections.
Added in: v4.9.0
Usage
context.panel.sectionsUtils.expandedState;
Example
const sectionsExpandedState = context.panel.sectionsUtils.expandedState;