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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(display-emitter): support Vue3 to the component #1555

Merged
merged 6 commits into from
Jul 23, 2024

Conversation

joseacabaneros
Copy link
Member

Support Vue3 to the DisplayEmittercomponent becuase the same issue we already saw with the MainScroll #1552.

A template ref over a slot (AKA NoElement) in vue3 renders a Fragment and the ref is lost, but in vue2 renders the first vNode of the slot and assign the ref in a right way.

@joseacabaneros joseacabaneros requested a review from a team as a code owner July 5, 2024 11:45
…display-emitter-vue3

# Conflicts:
#	packages/_vue3-migration-test/src/components/index.ts
#	packages/_vue3-migration-test/src/main.ts
#	packages/_vue3-migration-test/src/router.ts
});

onUnmounted(unwatchDisplay);
onUnmounted(() => {
unwatchDisplay();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
unwatchDisplay();
unwatchDisplay && unwatchDisplay();

I guess this will not happen but there's a chance that unwatchDisplay is undefined now, so I think we should just check for it before invoking it

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

victorcg88
victorcg88 previously approved these changes Jul 11, 2024
Copy link
Contributor

@victorcg88 victorcg88 left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested locally and it works just fine.

@diegopf diegopf merged commit 21bcd52 into main Jul 23, 2024
4 checks passed
@diegopf diegopf deleted the support-display-emitter-vue3 branch July 23, 2024 09:38
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.

3 participants