eLabSDK2.Inventory.StorageLayer.StorageLayer
Hierarchy
-
↳
StorageLayer
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 Storage Layer (sub Storage Unit) nodes in the tree
Parameters
Name | Type | Description |
---|---|---|
nodeContent | TreeNodeAddition | { id: string, html: string, isVisible?: (StorageLayer) => boolean } isVisible is a function that will be called with the current item (storagelayer) as argument |
Returns
any
configureTreeNode
Static
configureTreeNode(nodeConfiguration
): any
Customize the way a compartment 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 storage layer nodes
eLabSDK2.Inventory.StorageLayer.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (sl) => (true)})
Example
// Apply to a specific storage layer node using its ID
eLabSDK2.Inventory.StorageLayer.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (sl) => (sl.storageLayerID === 1)})
Parameters
Name | Type | Description |
---|---|---|
nodeConfiguration | TreeNodeConfiguration | { id: string, color: string, icon: string, toolTip: string, customLabel: (StorageLayer) => string, isVisible?: (StorageLayer) => boolean } |
Returns
any
getActiveStorageLayerID
Static
getActiveStorageLayerID(): number
Get storage layer id of the current active storagelayer
Returns
number
the storagelayer id or null.
© 2023 eLabNext
Updated 17 days ago