#1098 - Fix performance issues on item list change. Rebuild the whole list instead of comparing changed items.

This commit is contained in:
Stefan Ceriu
2021-10-07 10:34:17 +03:00
parent 261524c99c
commit c5e9d11500
@@ -51,6 +51,7 @@ struct UserSuggestionList: View {
.listStyle(PlainListStyle())
.environment(\.defaultMinListRowHeight, rowHeight)
.frame(height: min(maxHeight, rowHeight * CGFloat(viewModel.viewState.items.count)))
.id(UUID()) // Rebuild the whole list on item changes. Fixes performance issues.
}
}
}