Skip to content

Commit

Permalink
fix(antd/next): fix array collapse can not reactive panel props
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Jun 21, 2021
1 parent 836a7eb commit 0967b13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/antd/src/array-collapse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export const ArrayCollapse: ComposedArrayCollapse = observer(
return (
<Collapse.Panel
{...props}
{...panelProps}
forceRender
key={index}
header={header()}
Expand Down
7 changes: 6 additions & 1 deletion packages/next/src/array-collapse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ export const ArrayCollapse: ComposedArrayCollapse = observer(
/>
)
return (
<Collapse.Panel {...props} key={index} title={title()}>
<Collapse.Panel
{...props}
{...panelProps}
key={index}
title={title()}
>
<ArrayBase.Item index={index} key={index}>
{content}
</ArrayBase.Item>
Expand Down

0 comments on commit 0967b13

Please sign in to comment.