[英]Ant design Collapse is not working with Map
I'm using collapse using Ant-Design put inside the Collapse tag if I put Map for panel, It's not working can someone suggest me the solution.如果我将 Map 用于面板,我将使用 Ant-Design 使用折叠标签内的折叠,有人可以建议我解决方案。 Without Map It work.
没有 Map 它可以工作。 But using Map it's not.
但是使用 Map 不是。
Here is the Code:这是代码:
<Collapse
defaultActiveKey={["1"]}
accordion
expandIcon={(props) => customExpandIcon(props)}
ghost
>
{JSON.map((assesment, index) => (
<div>
<Panel index header="This is panel header 1" key="1">
<p>Header1</p>
</Panel>
</div>
))}
</Collapse>
There seems to be a few problems I would like to point out that should be corrected.似乎有一些问题我想指出应该纠正的。
Here you have a example using map https://codesandbox.io/s/mystifying-microservice-tuef7?file=/index.js这里有一个使用 map https://codesandbox.io/s/mystifying-microservice-tuef7?file=/index.js的示例
Please ask any questions if this did not answer your question.如果这没有回答您的问题,请提出任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.