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

Message component's getContainer property doesn't work well #6937

Closed
1 task done
budaestew opened this issue Sep 11, 2023 · 1 comment · Fixed by #6942
Closed
1 task done

Message component's getContainer property doesn't work well #6937

budaestew opened this issue Sep 11, 2023 · 1 comment · Fixed by #6942
Assignees
Labels

Comments

@budaestew
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.1

Environment

Windows 11, MS Edge 116, Vue 3.3.4

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Pass the getContainer property for any div container to useMessage.

<template>
  <div id="container"/>
</template>
...
<script setup>
const [messageApi, contextHolder] = message.useMessage({
  getContainer: () => document.getElementById('container')
});
</script>

What is expected?

The Message component must be mounted within the container specified by getContainer.

What is actually happening?

If getContainer is specified, it still references document.body

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants