import "@arcgis/map-components/components/arcgis-feature-form";Demo
Properties
| Property | Attribute | Type |
|---|---|---|
autoDestroyDisabled | auto-destroy-disabled | boolean |
editType | edit-type | "DELETE" | "INSERT" | "NA" | "UPDATE" |
feature | | Graphic |
formTemplate | | FormTemplate |
groupDisplay | group-display | "all" | "sequential" |
headingLevel | heading-level | number |
icon | icon | string |
label | label | string |
layer | | FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | SceneLayer | SubtypeSublayer |
positiondeprecated | position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" |
referenceElement | reference-element | HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string |
statereadonlyreflected | state | "disabled" | "ready" |
timeZone | time-zone | string |
autoDestroyDisabled
autoDestroyDisabled: booleanIf 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
editType
editType: "DELETE" | "INSERT" | "NA" | "UPDATE"The edit type for the form, which determines the editing context and behavior.
- Attribute
- edit-type
- Default value
- "NA"
groupDisplay
groupDisplay: "all" | "sequential"Defines how groups will be displayed to the user.
- Attribute
- group-display
- Default value
- "all"
headingLevel
headingLevel: numberIndicates the heading level to use for the title of the form.
- Attribute
- heading-level
- Default value
- 2
icon
icon: stringIcon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).
- See also
- Attribute
- icon
- Default value
- "form-field"
layer
layer: FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | SceneLayer | SubtypeSublayerLayer containing the editable feature attributes.
position
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"slot instead.- Attribute
- position
referenceElement
referenceElement: HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | stringBy assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
- Attribute
- reference-element
state
state: "disabled" | "ready"The current state of the component.
- Attribute
- state
- Default value
- "disabled"
Methods
| Method | Signature |
|---|---|
componentOnReady | componentOnReady(): Promise<void> |
destroy | destroy(): Promise<void> |
getValues | getValues(): Promise<any> |
submit | submit(): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>Create a promise that resolves once component is fully loaded.
Example
const arcgisFeatureForm = document.querySelector("arcgis-feature-form");
document.body.append(arcgisFeatureForm);
await arcgisFeatureForm.componentOnReady();
console.log("arcgis-feature-form is ready to go!");- Returns
- Promise<void>
getValues
getValues(): Promise<any>Returns all of the field values, regardless of update status.
- Returns
- Promise<any>
Events
| Event | Type |
|---|---|
arcgisPropertyChange | CustomEvent<{ name: "state"; }> |
arcgisReady | CustomEvent<void> |
arcgisSubmit | CustomEvent<FeatureFormSubmitEvent> |
arcgisValueChange | CustomEvent<FeatureFormValueChangeEvent> |
arcgisPropertyChange
arcgisPropertyChange: CustomEvent<{ name: "state"; }>Emitted when the value of a property is changed. Use this to listen to changes to properties.
arcgisReady
arcgisReady: CustomEvent<void>Emitted when the component associated with a map or scene view is ready to be interacted with.
arcgisSubmit
arcgisSubmit: CustomEvent<FeatureFormSubmitEvent>Fires when the submit() method is called.
arcgisValueChange
arcgisValueChange: CustomEvent<FeatureFormValueChangeEvent>Fires when a field value is updated.