itemArray property

Array? get itemArray

Gets or sets a JavaScript Array of values or objects, each of which will be represented by a Panel as elements in this Panel. Replacing this array results all of this panel's child objects being replaced with a copy of the Panel found in #itemTemplateMap for each particular item in the Array.

Because the software does not receive any notifications when an Array is modified, any insertions or removals or replacements of data in the Array will not be noticed unless you call Model#insertArrayItem or Model#removeArrayItem. You may also reset this property to its current value (the modified Array) or call #updateTargetBindings, if there is a Binding whose target is this property.

When binding this property, it is commonplace to set Model#copiesArrays and Model#copiesArrayObjects properties to true, so that when a node is copied, the item Array and its contents are copied, not shared. Or more generally, to customize the model's copying processes, you can supply a custom Model#copyNodeDataFunction and perhaps a GraphLinksModel#copyLinkDataFunction.

Any JavaScript Object that is in this Array must only appear once in the array and must not appear in any other Panel#itemArrays. Use #findItemPanelForData to find the data-bound Panel created for an Object in this panel's item Array.

Non-Object values in an item Array may appear multiple times. An item Array may be shared by multiple Panels.

Item Arrays should not be used with Grid Panels or Graduated Panels as they may not have nested Panels.

Implementation

_i7.Array<_i2.dynamic>? get itemArray => _i4.getProperty(
      this,
      'itemArray',
    );
set itemArray (Array? value)

Implementation

set itemArray(_i7.Array<_i2.dynamic>? value) {
  _i4.setProperty(
    this,
    'itemArray',
    value ?? _i5.undefined,
  );
}