Skip to content

Commit 74bed59

Browse files
authored
chore: rm one more dom (#572)
* chore: rm one more dom * fix: lint
1 parent 2d70602 commit 74bed59

File tree

2 files changed

+1
-49
lines changed

2 files changed

+1
-49
lines changed

src/UniqueProvider/MotionContent.tsx

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/UniqueProvider/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import useTargetState from './useTargetState';
1414
import { isDOM } from '@rc-component/util/lib/Dom/findDOMNode';
1515
import FloatBg from './FloatBg';
1616
import classNames from 'classnames';
17-
import MotionContent from './MotionContent';
1817
import { getAlignPopupClassName } from '../util';
1918

2019
export interface UniqueProviderProps {
@@ -43,8 +42,6 @@ const UniqueProvider = ({ children }: UniqueProviderProps) => {
4342
});
4443

4544
// ========================== Register ==========================
46-
const [popupId, setPopupId] = React.useState(0);
47-
4845
// Store the isOpen function from the latest show call
4946
const isOpenRef = React.useRef<(() => boolean) | null>(null);
5047

@@ -56,9 +53,6 @@ const UniqueProvider = ({ children }: UniqueProviderProps) => {
5653
isOpenRef.current = isOpen;
5754

5855
delayInvoke(() => {
59-
if (showOptions.id !== options?.id) {
60-
setPopupId((i) => i + 1);
61-
}
6256
trigger(showOptions);
6357
}, showOptions.delay);
6458
},
@@ -172,11 +166,7 @@ const UniqueProvider = ({ children }: UniqueProviderProps) => {
172166
ref={setPopupRef}
173167
portal={Portal}
174168
prefixCls={prefixCls}
175-
popup={
176-
<MotionContent prefixCls={prefixCls} key={popupId}>
177-
{options.popup}
178-
</MotionContent>
179-
}
169+
popup={options.popup}
180170
className={classNames(
181171
options.popupClassName,
182172
alignedClassName,

0 commit comments

Comments
 (0)