Embedded Library Events
This applies to: Visual Data Discovery
Events can be used in your JavaScript to control an embedded Symphony component when specific events occur.
Note: The ability for your end-users to perform some of the events listed here is controlled by the permissions granted to them with their Symphony credentials. See Embedded Symphony Component Controls.
You can subscribe using .addEventListener() to embedded inventory component events so that you can execute your own logic when an event occurs.
Note: Symphony provides a
componentInstanceId
provides a as part of event details for dashboard, source, and visual events.
The following events are supported:
Event | Data Passed | Example |
---|---|---|
composer-inventory-ready | undefined | inventory.addEventListener("composer-inventory-ready", (e) => {
console.log(e);
}); |
composer-inventory-loaded | Inventory items e.detail.inventoryItems | inventory.addEventListener("composer-inventory-loaded", (e) => {
console.log(e.detail.inventoryItems);
); |
composer-inventory-failed | Failed reason e.detail.failedReason | inventory.addEventListener("composer-inventory-failed", (e) => {
console.log(e.detail.failedReason);
}); |
composer-inventory-item-deleted | Inventory item data
| inventory.addEventListener("composer-inventory-item-deleted", (e) => {
console.log(e.detail.inventoryItem);
}}; |