Reactive card button that works despite great lag to server #4451
evnchn
started this conversation in
Show and tell
Replies: 2 comments 4 replies
-
I've faced similar issues. I wonder if removing/optimizing the frontend lag is something that the maintainers would consider as a next step for all UI elements. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Thanks for sharing this example, @evnchn! If I understand correctly, you're defining a JavaScript event handler to add an immediate click animation. But as far as I know, a regular button should behave identically: The animation is triggered on the client before an event is sent to and processed on the server. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm in Europe, and my server's in Asia, so I feel the lag.
Excerpt from my project.
Because of the lookout for the correct element, it will work even when there are nested elements in the card.
If there are other buttons in the card, you can apply a class which causes the JS handler to immediately return and not show the animation.
Beta Was this translation helpful? Give feedback.
All reactions