ESM
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.

See also
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-item
heading="Function summary"
></arcgis-utility-network-trace-functions-result-item>
</arcgis-utility-network-trace-results>
</arcgis-utility-network-trace-analysis>
</arcgis-map>

Properties

autoDestroyDisabled

Property
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

readonly Property
Type
true

Whether the component emits event @arcgisResultReady. This property is always true for arcgis-utility-network-trace-functions-result-item.

Default value
false

heading

Property
Type
string | undefined

The heading displayed above the function results table. If not specified or empty, the component uses its localized default heading.

Attribute
heading

messageOverrides

Property
Type
Record<string, unknown> | undefined

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

state

readonly Property
Type
UtilityNetworkTraceResultItemState

The processing state of the functions result item. This property is always "ready" because function results require no processing.

Default value
"ready"

traceResult

readonly Property
Type
TraceResult | undefined

The trace result containing the function results to display. The parent arcgis-utility-network-trace-results component supplies this property.

Methods

MethodSignature
clearResult(): void
inherited
componentOnReady(): Promise<this>
destroy(): Promise<void>

clearResult

Method
Signature
clearResult (): void

Clears traceResult. Does not emit @arcgisResultReady.

Returns
void

componentOnReady

inherited Method
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!");

destroy

Method
Signature
destroy (): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

Events

arcgisPropertyChange

Event
arcgisPropertyChange: CustomEvent<{ name: "state"; }>

Emitted when the value of a property is changed. Use this to listen to changes to properties.

bubbles composed cancelable

arcgisResultReady

Event
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.

bubbles composed cancelable