▾
import "@arcgis/map-components/components/arcgis-utility-network-trace-functions-result-item";- Inheritance
- ArcgisUtilityNetworkTraceFunctionsResultItem→
HTMLElement
- Since
- ArcGIS Maps SDK for JavaScript 5.2
The Utility Network Trace Functions Result Item component displays the function results returned by a utility network trace. It displays function results in a table with the function name and value. If a function name is unavailable, the component displays the function result's network attribute name and function type. Function results without a network attribute name, function type, or result value are not displayed.
Add this component directly to the default slot of arcgis-utility-network-trace-results. The parent supplies the required read-only trace result property.
By default, the arcgis-utility-network-trace-results component displays the aggregated geometry, elements, and functions result items for the result types returned by the trace. Adding content to its default slot replaces all default result items. Add each result item that the custom configuration should display.
- Example
The following example displays function results in a custom set of trace result items. Providing result items in the default slot replaces the parent's default result items. This example displays only function results.
<arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310"><arcgis-utility-network-trace-analysis slot="bottom-left"><arcgis-utility-network-trace-results slot="results"><arcgis-utility-network-trace-functions-result-itemheading="Function summary"></arcgis-utility-network-trace-functions-result-item></arcgis-utility-network-trace-results></arcgis-utility-network-trace-analysis></arcgis-map>
Properties
| Property | Attribute | Type |
|---|---|---|
| auto-destroy-disabled | ||
| readonly | | true |
| heading | ||
| | ||
| readonly | | |
| readonly | |
autoDestroyDisabled
- Type
- boolean
If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy() method when you are done to prevent memory leaks.
- Attribute
- auto-destroy-disabled
- Default value
- false
- Example
- <arcgis-utility-network-trace-functions-result-item auto-destroy-disabled></arcgis-utility-network-trace-functions-result-item>utilityNetworkTraceFunctionsResultItemElement.autoDestroyDisabled = true;
emitsArcgisResultReady
- Type
- true
Whether the component emits event @arcgisResultReady.
This property is always true for arcgis-utility-network-trace-functions-result-item.
- Default value
- false
traceResult
- Type
- TraceResult | undefined
The trace result containing the function results to display. The parent arcgis-utility-network-trace-results component supplies this property.
Methods
| Method | Signature |
|---|---|
| clearResult(): void | |
| inherited | componentOnReady(): Promise<this> |
| destroy(): Promise<void> |
clearResult
- Signature
-
clearResult (): void
Clears traceResult. Does not emit @arcgisResultReady.
- Returns
- void
componentOnReady
- Signature
-
componentOnReady (): Promise<this>
Creates a promise that resolves once the component is fully loaded.
- Returns
- Promise<this>
- Example
- const arcgisUtilityNetworkTraceFunctionsResultItem = document.createElement("arcgis-utility-network-trace-functions-result-item");document.body.append(arcgisUtilityNetworkTraceFunctionsResultItem);await arcgisUtilityNetworkTraceFunctionsResultItem.componentOnReady();console.log("arcgis-utility-network-trace-functions-result-item is ready to go!");
Events
| Name | Type |
|---|---|
| CustomEvent<{ name: "state"; }> | |
arcgisPropertyChange
arcgisPropertyChange: CustomEvent<{ name: "state"; }> Emitted when the value of a property is changed. Use this to listen to changes to properties.
arcgisResultReady
arcgisResultReady: CustomEvent<void> Fires when the component finishes processing the current trace result, including when the result contains no function results. Calling clearResult() does not emit this event.