x-show only waits first child to transition #1403
Unanswered
matheusb-comp
asked this question in
5. Bugs
Replies: 2 comments
-
I'm facing the same issue. Do you have a workaround? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I looked at this a few weeks ago but forgot to reply. The workaround would be to place the element with the higher value first as Alpine isn't tracking sibling timers but the first child it encounters. You'd then have to position your elements with CSS accordingly, which isn't ideal of course, but should be pretty trivial. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From the docs:
I assume that
x-show
will wait until the children with the longest transition duration gets hidden before the element itself being hidden.However in version 2.7.3, if the first child has
duration.400ms
and the secondduration.2000ms
, the parent div is hidden as soon as the first child finishes.Example: https://jsfiddle.net/9atkrghe/6/
code
The same happens when using
x-transition
and Tailwind classes: https://jsfiddle.net/xpkr32as/53/Beta Was this translation helpful? Give feedback.
All reactions