Skip to content

Commit d71a25f

Browse files
authored
Merge pull request #511 from Esri/df/apollo300
`FormView` - Fix autoscroll
2 parents 56dc193 + 79078b0 commit d71a25f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ArcGISToolkit/Components/FormView/FormView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public struct FormView: View {
5353
}
5454
}
5555
}
56-
.onChange(of: model.focusedElement) { focusedElement in
57-
if let focusedElement {
56+
.task(id: model.focusedElement) {
57+
if let focusedElement = model.focusedElement {
5858
withAnimation { scrollViewProxy.scrollTo(focusedElement, anchor: .top) }
5959
}
6060
}

0 commit comments

Comments
 (0)