I am trying to implement Stepper with SwiftUI and have added maxLimit to 5 but it expands that limit with State.
So, The problem here is if I click continuously on increment, let say 8 times, even though maxPricelevel is of 5, I have to click 3 times first to actual decerement to be done.
Code Block Stepper("Show \(String(repeating: "$", count: maxPriceLevel)) or below") { if maxPriceLevel < 5 { maxPriceLevel += 1 } } onDecrement: { if maxPriceLevel > 1 { maxPriceLevel -= 1 } }
So, The problem here is if I click continuously on increment, let say 8 times, even though maxPricelevel is of 5, I have to click 3 times first to actual decerement to be done.