import { AttributeTableFieldElement, AttributeTableGroupElement, AttributeTableRelationshipElement, AttributeTableAttachmentElement } from "@arcgis/core/tables/elements.js";const { AttributeTableFieldElement, AttributeTableGroupElement, AttributeTableRelationshipElement, AttributeTableAttachmentElement } = await $arcgis.import("@arcgis/core/tables/elements.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
A convenience module for importing AttributeTableElement classes when developing with TypeScript. For example, rather than importing table elements one at a time like this:
import TableAttachmentElement from "@arcgis/core/tables/elements/AttributeTableAttachmentElement.js";import TableFieldElement from "@arcgis/core/tables/elements/AttributeTableFieldElement.js";import TableGroupElement from "@arcgis/core/tables/elements/AttributeTableGroupElement.js";import TableRelationshipElement from "@arcgis/core/tables/elements/AttributeTableRelationshipElement.js";You can use this module to import them on a single line:
import { AttributeTableAttachmentElement, AttributeTableFieldElement, AttributeTableGroupElement, AttributeTableRelationshipElement } from "@arcgis/core/tables/elements.js";This module also allows you to implement type guards on the attribute table elements, making your code smarter.
import { AttributeTableElement } from "@arcgis/core/tables/elements.js";
function logTableElement(element: AttributeTableElement): void { if (element.type === "field") { console.log("Attribute table element type is field"); } else { console.log("The value is not a table field element.") }}Type definitions
AttributeTableFieldElement
AttributeTableFieldElement defines how a feature layer's field participates in the attribute table.
- Supertypes
- default
AttributeTableGroupElement
AttributeTableGroupElement defines a container that holds a set of attribute table elements
that can be displayed together.
- Supertypes
- default
AttributeTableRelationshipElement
AttributeTableRelationshipElement defines how a relationship between feature layers and Map.tables participates in the FeatureTable.
- Supertypes
- default
AttributeTableAttachmentElement
AttributeTableAttachmentElement defines how one or more attachments can participate in the attribute table.
- Supertypes
- default
Variables
AttributeTableFieldElement
AttributeTableFieldElement defines how a feature layer's field participates in the attribute table.
- Type
- typeof AttributeTableFieldElementClass
AttributeTableGroupElement
AttributeTableGroupElement defines a container that holds a set of attribute table elements
that can be displayed together.
- Type
- typeof AttributeTableGroupElementClass
AttributeTableRelationshipElement
AttributeTableRelationshipElement defines how a relationship between feature layers and Map.tables participates in the FeatureTable.
- Type
- typeof AttributeTableRelationshipElementClass
AttributeTableAttachmentElement
AttributeTableAttachmentElement defines how one or more attachments can participate in the attribute table.
- Type
- typeof AttributeTableAttachmentElementClass