Closed Parabak closed 11 months ago
@Parabak it would help to have a minimum reproducible case - I suspect the viewModel is not needed at all and this could reproduce with a @State
as well.
Since it works with SwiftUI.Text
, I'd expect it's tied to the fact that textColor
here is a custom Orbit modifier...
The issue is in a missing re-evaluation when the textColor
is applied directly to the Text like here (and not using environment). It applies to other chainable modifiers as well.
Workaround: Wrapping the Text
in a a Group
(or a stack) works, because it uses a different way to modify the color (not the chainable and concatenable version).
Tested with iOS 17
For some reason Content is not fully updated on a change. ViewModel's
isSelected
is@Published var isSelected: Bool
. On a tap I would expect that Text color will be changed however it's not.Update: