From 5a625e31a76f546516e0643037ba53f971b97c82 Mon Sep 17 00:00:00 2001 From: david-swift Date: Thu, 4 Jan 2024 16:14:18 +0100 Subject: [PATCH] Make the combo row a bit safer --- Sources/Adwaita/View/Forms/ComboRow.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Adwaita/View/Forms/ComboRow.swift b/Sources/Adwaita/View/Forms/ComboRow.swift index 4bcbb80..a281310 100644 --- a/Sources/Adwaita/View/Forms/ComboRow.swift +++ b/Sources/Adwaita/View/Forms/ComboRow.swift @@ -74,7 +74,7 @@ where Element: CustomStringConvertible, Element: Identifiable, Element: Equatabl } update(row: row) _ = row.onChange { - if let element = content.first(where: { $0.description == row.selected() }) { + if let element = content.first(where: { $0.description == row.selected() }), element.id != selection { selection = element.id } }