You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~SHEET""" "background-" <> color do foregroundStyle(Color.{color}) ignoresSafeArea(.all) end "counter" do font(.system(size: 300, weight: .regular, design: .monospaced)) foregroundStyle( .linearGradient( colors: [.purple, .green], startPoint: .top, endPoint: .bottom ) ) minimumScaleFactor(0.5) lineLimit(1) padding(.bottom, 20) end "button-border" do stroke(.gray, lineWidth: 2) end "button-" <> color do font(.system(size: 16, weight: .bold, design: .monospaced)) frame(width: 50, height: 50) foregroundStyle( .linearGradient( colors: [.white, .{color}], startPoint: .top, endPoint: .bottom ) ) overlay(content: :border) background(Color.clear) clipShape(.circle) end"""
defmoduleCounterWeb.HomeLive.SwiftUIdouseCounterNative,[:render_component,format: :swiftui]defcounter_button(assigns)do~LVN""" <Button class={@class} phx-click="incr-by" phx-value-by={@value}> <Circle class="button-border" template="border" /> <%= if @value < 0 do %> <%= @value %> <% else %> +<%= @value %> <% end %> </Button>"""endend
When I use the buttons to increment the counter, the slider's state always seems to be behind by one action:
You will see that when I press +10 the slider's value doesn't change. The counter increases though. If I press +10 again, the slider will change but not to the actual @counter value. If I press -10 the slider will increase but the counter value decreases.
The text was updated successfully, but these errors were encountered:
I have the following:
When I use the buttons to increment the counter, the slider's state always seems to be behind by one action:
You will see that when I press
+10
the slider's value doesn't change. The counter increases though. If I press+10
again, the slider will change but not to the actual@counter
value. If I press-10
the slider will increase but the counter value decreases.The text was updated successfully, but these errors were encountered: