Skip to content

Commit f59f0cd

Browse files
committed
update destroyOnClose to destroyOnHidden
1 parent 5d63120 commit f59f0cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Dialog/Content/MemoChildren.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export type MemoChildrenProps = {
66
};
77

88
export default React.memo(
9-
({ children }: MemoChildrenProps) => children as React.ReactElement,
9+
({ children }: MemoChildrenProps) => children as React.ReactElement<any>,
1010
(_, { shouldUpdate }) => !shouldUpdate,
1111
);

tests/index.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ describe('dialog', () => {
384384
render(
385385
<Dialog
386386
visible
387-
modalRender={(node: React.ReactElement) =>
387+
modalRender={(node: React.ReactElement<any>) =>
388388
cloneElement(node, { ...node.props, style: { background: '#1890ff' } })
389389
}
390390
/>,
@@ -394,7 +394,7 @@ describe('dialog', () => {
394394

395395
describe('focusTriggerAfterClose', () => {
396396
it('should focus trigger after close dialog', () => {
397-
const Demo = () => {
397+
const Demo: React.FC = () => {
398398
const [visible, setVisible] = React.useState(false);
399399
return (
400400
<>

0 commit comments

Comments
 (0)