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

Unexpected context data lost when a portal component was unmounted #43

Closed
Macrox opened this issue Nov 13, 2018 · 0 comments
Closed

Unexpected context data lost when a portal component was unmounted #43

Macrox opened this issue Nov 13, 2018 · 0 comments
Assignees

Comments

@Macrox
Copy link
Contributor

Macrox commented Nov 13, 2018

Describe the bug

ConfigProvider.getContext() will losing its cached context data after a portal component (e.g.: Dialog.show()) was unmounted.

Version of the Next Components

^1.9.15

Reproduce URL

https://codepen.io/anon/pen/vQgmbP?&editors=0010

To Reproduce

  1. Use <ConfigProvider> to wrap the app.
  2. Set locale prop on <ConfigProvider> with { Dialog: { ok: 'OK', cancel: 'Cancel' } }
  3. Call Dialog.confirm or the other method which do create a portal modal
  4. Close the modal
  5. Call Dialog.confirm again

Expected behavior

The text of the modal's button always be OK and Cancel, but it'll be 确定 and 取消 except first mounting.

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

No branches or pull requests

2 participants