Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DecimalField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ struct DecimalField : View {
return
}
// This is the only place we update `value`.
self.value = self.formatter.number(from: $0)?.decimalValue
if self.value != self.formatter.number(from: $0)?.decimalValue {
self.value = self.formatter.number(from: $0)?.decimalValue
}
}
.onAppear(){ // Otherwise textfield is empty when view appears
self.hasInitialTextValue = true
Expand Down