Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): fix select content animation #789

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

Chrtyaka
Copy link
Contributor

Hi 馃憢馃徎 Closes #787

Changed

SelectContent.vue

  • rewrite template for using v-if/ v-else
  • wrap select provider in div

It's bug because <Transiton /> can't be applied on fragment or multi root components. I tried some hacks and debug, and come up with this solution:

  • set prop present in Presence component to true. And move old prop value to v-if
  • wrap Teleport with div and v-else-if condition.

And it works. Maybe I'm missing something, but it works 馃槄

Artifact

CleanShot.2024-03-26.at.5.12.05.mp4

Select content root renders fragment. Transition can't be applied to fragment. Changed to div
@Chrtyaka Chrtyaka changed the title fix(select): fix select root element render fix(select): fix select content animation warning Mar 26, 2024
@Chrtyaka Chrtyaka changed the title fix(select): fix select content animation warning fix(select): fix select content animation Mar 26, 2024
Copy link
Collaborator

@zernonia zernonia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR @Chrtyaka 馃榿

@zernonia zernonia merged commit 82d5aef into radix-vue:main Mar 27, 2024
2 checks passed
@Chrtyaka Chrtyaka deleted the fix/select_animation branch March 27, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot animate Select Content
2 participants