Skip to content

Forms: Fix renamed method calls #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import com.arcgismaps.mapping.featureforms.SwitchFormInput
import com.arcgismaps.mapping.featureforms.TextAreaFormInput
import com.arcgismaps.mapping.featureforms.TextBoxFormInput
import com.arcgismaps.toolkit.featureforms.components.base.BaseFieldState
import com.arcgismaps.toolkit.featureforms.components.base.MutableStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.MutableFormStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.FormStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.getState
import com.arcgismaps.toolkit.featureforms.components.base.rememberBaseGroupState
Expand Down Expand Up @@ -204,7 +204,7 @@ internal fun rememberStates(
context: Context,
scope: CoroutineScope
): FormStateCollection {
val states = MutableStateCollection()
val states = MutableFormStateCollection()
form.elements.forEach { element ->
when (element) {
is FieldFormElement -> {
Expand All @@ -215,7 +215,7 @@ internal fun rememberStates(
}

is GroupFormElement -> {
val fieldStateCollection = MutableStateCollection()
val fieldStateCollection = MutableFormStateCollection()
element.formElements.forEach {
if (it is FieldFormElement) {
val state = rememberFieldState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.arcgismaps.toolkit.featureforms.components.base.BaseFieldState
import com.arcgismaps.toolkit.featureforms.components.base.BaseGroupState
import com.arcgismaps.toolkit.featureforms.components.base.MutableStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.MutableFormStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.FormStateCollection
import com.arcgismaps.toolkit.featureforms.components.base.getState

Expand Down Expand Up @@ -158,7 +158,7 @@ private fun GroupElementPreview() {
label = "Title",
description = "Description",
expanded = false,
fieldStates = MutableStateCollection(),
fieldStates = MutableFormStateCollection(),
modifier = Modifier.padding(start = 15.dp, end = 15.dp, top = 10.dp, bottom = 10.dp),
colors = GroupElementDefaults.colors(),
onClick = {}
Expand Down