import AttachmentsViewOptions from "@arcgis/core/widgets/FeatureTable/support/AttachmentsViewOptions.js";const AttachmentsViewOptions = await $arcgis.import("@arcgis/core/widgets/FeatureTable/support/AttachmentsViewOptions.js");- Inheritance:
- AttachmentsViewOptions→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.33
AttachmentsViewOptions is a read-only class which defines what can be displayed within FeatureTable attachments. It is used to manage the state of the attachments view, including the current attachment being edited, the list of attachment information, candidates for new attachments, and any errors that may occur. It is meant to provide a user-friendly interface for managing attachments in the FeatureTable widget
It is important to note that this class does not handle the actual uploading or downloading of attachments, but rather manages the state and options for displaying attachments within the FeatureTable widget.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
attachmentId readonly | | |
attachmentInfos readonly | | |
candidates readonly | | |
declaredClass readonly inherited | ||
error readonly | | |
form readonly | | |
mode readonly | "list" | "details" | "file" | |
objectId readonly | |
attachmentInfos
- Type
- AttachmentInfo[]
An array of attachment information objects.
- Default value
- []
form
- Type
- HTMLFormElement | null | undefined
The HTML form element used for file uploads. This is typically used to submit files to the server.
mode
- Type
- "list" | "details" | "file"
The current mode of the attachments view.
This can be either list to display a list of attachments, details to see information about
a specific attachment or file to allow file uploads. If an attachmentId is also set
then uploading a file will replace the attachment with that id.
- Default value
- "list"
Methods
| Method | Signature | Class |
|---|---|---|
onEditComplete(): void | | |
reset(): void | |
onEditComplete
- Signature
-
onEditComplete (): void
Used to display the list view and clear temporary file data after a successful edit.
It resets the attachmentId, clears the candidates, and sets the mode to list to display the list of attachments.
- Returns
- void