eLabSDK2.Inventory.Equipment
Hierarchy
-
↳
Equipment
Methods
addTreeNodeAddition
Static
addTreeNodeAddition(nodeContent
): any
Add extra content to be rendered in the treenavigator of the inventory browser.
Content registered here will be displayed on Equipment nodes in the tree
Parameters
Name | Type | Description |
---|---|---|
nodeContent | TreeNodeAddition | { id: string, html: string, isVisible?: (Equipment) => boolean } isVisible is a function that will be called with the current item (Equipment) as argument |
Returns
any
configureTreeNode
Static
configureTreeNode(nodeConfiguration
): any
Customize the way equipment node is rendered in the tree navigator.
customLabel is an optional function that has the StorageLayer object as input
and returns the label to render.
isVisible is a function that will be called with the current item (storagelayer) as argument
Example
// Apply to all equipment nodes
eLabSDK2.Inventory.Equipment.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (eq) => (true)})
Example
// Apply to a specific equipment node using its ID
eLabSDK2.Inventory.Equipment.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (eq) => (eq.id=== 1)})
Parameters
Name | Type | Description |
---|---|---|
nodeConfiguration | TreeNodeConfiguration | { id: string, color: string, icon: string, toolTip: string, customLabel: (StorageLayer) => string, isVisible?: (StorageLayer) => boolean } |
Returns
any
© 2023 eLabNext
Updated 17 days ago