Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Make the combo row a bit safer
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Jan 4, 2024
1 parent 853555a commit 5a625e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Forms/ComboRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 5a625e3

Please sign in to comment.