elements

AMD: require(["esri/tables/support/elements"], (elements) => { /* code goes here */ });
ESM: import * as elements from "@arcgis/core/tables/support/elements.js";
Object: esri/tables/support/elements
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 "esri/tables/elements/AttributeTableAttachmentElement";
import TableFieldElement from "esri/tables/elements/AttributeTableFieldElement";
import TableGroupElement from "esri/tables/elements/AttributeTableGroupElement";
import TableRelationshipElement from "esri/tables/elements/AttributeTableRelationshipElement";

You can use this module to import them on a single line:

import { AttributeTableAttachmentElement, AttributeTableFieldElement, AttributeTableGroupElement, AttributeTableRelationshipElement } from "esri/tables/elements";

This module also allows you to implement type guards on the attribute table elements, making your code smarter.

import { AttributeTableElement } from "esri/tables/elements";

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.")
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close