Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dependencies": {
"@babel/runtime": "^8.0.0",
"@rc-component/motion": "^1.1.4",
"@rc-component/util": "^1.11.1",
"@rc-component/util": "^1.13.0",
"clsx": "^2.1.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { clsx } from 'clsx';
import CSSMotion from '@rc-component/motion';
import { KeyCode } from '@rc-component/util';
import { isReactRenderable, KeyCode } from '@rc-component/util';
import React from 'react';
import type { CollapsePanelProps } from './interface';
import PanelContent from './PanelContent';
Expand Down Expand Up @@ -30,7 +30,7 @@ const CollapsePanel = React.forwardRef<HTMLDivElement, CollapsePanelProps>((prop

const disabled = collapsible === 'disabled';

const ifExtraExist = extra !== null && extra !== undefined && typeof extra !== 'boolean';
const ifExtraExist = isReactRenderable(extra);

const collapsibleProps = {
onClick: () => {
Expand All @@ -50,7 +50,7 @@ const CollapsePanel = React.forwardRef<HTMLDivElement, CollapsePanelProps>((prop
// ======================== Icon ========================
const iconNodeInner =
typeof expandIcon === 'function' ? expandIcon(props) : <i className="arrow" />;
const iconNode = iconNodeInner && (
const iconNode = isReactRenderable(iconNodeInner) && (
<div
className={clsx(`${prefixCls}-expand-icon`, customizeClassNames?.icon)}
style={styles?.icon}
Expand Down
Loading