eLabSDK2.Inventory.StorageUnit.StorageUnit
Hierarchy
-
↳
StorageUnit
Methods
addTreeNodeAddition
Static addTreeNodeAddition(nodeContent): any
Add extra content to be rendered in the tree navigator of the inventory browser.
Content registered here will be displayed on Storage Unit nodes in the tree
Parameters
| Name | Type | Description |
|---|---|---|
nodeContent | TreeNodeAddition | { id: string, html: string, toolTip: string, isVisible?: (StorageUnit) => boolean } isVisible is a function that will be called with the current item (storageunit) as argument |
Returns
any
configureTreeNode
Static configureTreeNode(nodeConfiguration): any
Customize the way a storage unit 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 (storageunit) as argument
Example
// Apply to all storage unit nodes
eLabSDK2.Inventory.StorageUnit.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (su) => (true)})Example
// Apply to a specific storage unit node using its ID
eLabSDK2.Inventory.StorageUnit.configureTreeNode({id: 'sas', color: 'red', icon: 'fas fa-cookie', isVisible: (su) => (su.storageLayerID === 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 2 months ago