I have a list and when I insert an item, i want to the list to scroll to the bottom automatically when my @ObservedObject
changed.
There is my actual View code :
struct DialogView: View {
@ObservedObject var viewModel = DialogViewModel()
var body: some View {
List {
ForEach(self.viewModel.discussion, id: \.uuid) {
Text($0.content)
}
}.animation(Animation.easeOut)
}
}