Item class
đ Descriptionâ
The Item
class is an abstract class for creating item types for collections. Item collections are used to enable the user to create lists with items of a certain type. For example, options in a dropdown list.
đ Applicable decoratorsâ
The following decorators can be applied in this class:
Property decorators âšī¸â
Method decorators âšī¸â
đ constructor
â
Creates a new Item
instance.
Signatureâ
constructor(): Item
Return valueâ
Returns a reference to the new Item
instance.
đī¸ Fieldsâ
đˇī¸ collection
â
Retrieves a reference to the parent collection provider.
Typeâ
đˇī¸ editor
â
Retrieves the EditorOrchestrator
instance used to define the controls to manage the item.
You should use the @editor
decorator to mark the method that implements the controls.
Typeâ
đˇī¸ id
â
Retrieves the identifier of the item.
Typeâ
string
đˇī¸ index
â
Retrieves the zero-based index of the item in the collection.
Typeâ
number
đˇī¸ isFirst
â
Retrieves if the item is the first item in the collection.
Typeâ
boolean
đˇī¸ isLast
â
Retrieves if the item is the last item in the collection.
Typeâ
boolean
đˇī¸ predecessor
â
Retrieves a reference to the predecessor item (if any).
Typeâ
Item
| undefined
đˇī¸ ref
â
Retrieves a reference to the parent of the collection.
The reference is set using the reference
argument of the of
function.
Typeâ
NodeBlock
| ConditionBlock
| Item
đˇī¸ successor
â
Retrieves a reference to the successor item (if any).
Typeâ
Item
| undefined
âļī¸ Methodsâ
đ§ delete
â
Deletes the item.
Signatureâ
delete(): this
Return valueâ
Returns a reference to the Item
instance to allow chaining.
đ§ refresh
â
Refreshes the item.
Signatureâ
refresh(type?: "icon" | "name"): void
Parametersâ
Name | Type | Optional | Description |
---|---|---|---|
type | "icon" | "name" | Yes | Specifies what to refresh. |