Skip to content

Commit 935a52b

Browse files
defaultOpen should not animate
1 parent 989cd1d commit 935a52b

File tree

1 file changed

+10
-6
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/WorkspaceItem

1 file changed

+10
-6
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/WorkspaceItem/index.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React from 'react';
22
import { Animate as ReactShow } from 'react-show';
33

44
import {
5+
Actions,
56
ChildContainer,
7+
ExpandIconContainer,
68
ItemHeader,
79
Title,
8-
ExpandIconContainer,
9-
Actions,
1010
} from './elements';
1111

1212
type Props = {
@@ -68,11 +68,15 @@ export class WorkspaceItem extends React.Component<Props, State> {
6868
overflow: showOverflow ? 'initial' : 'hidden',
6969
}}
7070
transitionOnMount
71-
start={{
72-
height: 0, // The starting style for the component.
71+
start={
72+
open
73+
? null
74+
: {
75+
height: 0, // The starting style for the component.
7376

74-
// If the 'leave' prop isn't defined, 'start' is reused!
75-
}}
77+
// If the 'leave' prop isn't defined, 'start' is reused!
78+
}
79+
}
7680
show={open}
7781
duration={250}
7882
stayMounted={keepState}

0 commit comments

Comments
 (0)