Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions docs/demo/portal.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/examples/portal.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions src/Portal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ const Portal = forwardRef<PortalRef, PortalProps>((props, ref) => {
parentRef.current.appendChild(containerRef.current);
}
return () => {
// [Legacy] This should not be handle by Portal but parent PortalWrapper instead.
// Since some component use `Portal` directly, we have to keep the logic here.
// [Legacy] Some components use `Portal` directly, we have to keep the logic here.
containerRef.current?.parentNode?.removeChild(containerRef.current);
};
}, []);
Expand Down
242 changes: 0 additions & 242 deletions src/PortalWrapper.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ export { render, unmount } from './React/render';
export { spyElementPrototype, spyElementPrototypes } from './test/domHook';
export { default as Portal } from './Portal';
export type { PortalProps, PortalRef } from './Portal';
export type { GetContainer } from './PortalWrapper';
export type GetContainer = string | HTMLElement | (() => HTMLElement);
Loading
Loading