FeatureFormState

The state object for a FeatureForm used by the FeatureForm composable. This class is responsible for managing the state of the form and its elements. Hoist this state out of the composition to ensure that the state is not lost during configuration changes.

This class also provides a way to navigate between different FeatureForms of different ArcGISFeatures when viewing associations for an UtilityAssociationFormElement, if it is part of the provided FeatureForm. Use the activeFeatureForm property to get the currently active form as it is is updated when navigating from one form to another.

FeatureForm.evaluateExpressions is called automatically when navigating to a new FeatureForm or when navigating back to a previous FeatureForm. Expressions are also run when this class is created so you do not need to call FeatureForm.evaluateExpressions manually.

Since

200.8.0

Parameters

featureForm

the FeatureForm to create the state for.

Constructors

Link copied to clipboard
constructor(featureForm: FeatureForm, coroutineScope: CoroutineScope)

Properties

Link copied to clipboard
val activeFeatureForm: FeatureForm

The currently active FeatureForm. This property is updated when navigating between forms.

Functions

Link copied to clipboard
suspend fun discardEdits(): Result<List<FormExpressionEvaluationError>>

Discards all the edits made to the activeFeatureForm, refreshes the attachments and evaluates expressions.