Skip to content

Commit

Permalink
docs: add note regarding considerations for using getContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Aug 29, 2023
1 parent bb8705a commit fa6af98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/drawer/demo/render-in-current.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

> 注意:在 v5 中 `style``className` 迁移至 Drawer 面板上与 Modal 保持一致,原 `style``className` 替换为 `rootStyle``rootClassName`
> [#41951](https://github.com/ant-design/ant-design/issues/41951#issuecomment-1521099152) 所述,如果 `getContainer` 以 callback 的形式返回了自定义容器,需要手动设置 `rootStyle``{ position: 'absolute' }`,否则会导致 `Drawer` 组件的表现不如预期。
## en-US

Render in current dom. custom container, check `getContainer`.

> Note: `style` and `className` props are moved to Drawer panel in v5 which is aligned with Modal component. Original `style` and `className` props are replaced by `rootStyle` and `rootClassName`.
> As noted in [#41951](https://github.com/ant-design/ant-design/issues/41951#issuecomment-1521099152), if `getContainer` returns a custom container as a callback. The `rootStyle` needs to be set manually to `{ position: 'absolute' }`, otherwise the `Drawer` component will not behave as expected.

0 comments on commit fa6af98

Please sign in to comment.