Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ If `accordion` is true, only one panel can be open. Opening another panel will
<td>openMotion</td>
<td>object</td>
<th></th>
<td>set the animation of open behavior, [more](https://github.com/react-component/motion)</td>
<td>set the animation of open behavior, [more](https://github.com/react-component/motion). Different with v2, closed pane use a `rc-collapse-content-hidden` class to set `display: none` for hidden.</td>
</tr>
<tr>
<td>disabled</td>
Expand Down
1 change: 1 addition & 0 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class CollapsePanel extends React.Component<CollapsePanelProps, any> {
</div>
<CSSMotion
visible={isActive}
leavedClassName={`${prefixCls}-content-hidden`}
{...openMotion}
forceRender={forceRender}
removeOnLeave={destroyInactivePanel}
Expand Down
1 change: 1 addition & 0 deletions tests/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ describe('collapse', () => {
);
expect(collapse.find('.rc-collapse-content').length).toBe(1);
expect(collapse.find('.rc-collapse-content-active').length).toBe(0);
expect(collapse.find('div.rc-collapse-content-hidden').length).toBe(1);
});
});

Expand Down