【发布时间】:2018-07-23 22:20:17
【问题描述】:
在使用react-bootstrap Collapsible Panel 时,有没有办法从面板标题访问面板的折叠状态?在以下示例中:
<Panel>
<Panel.Heading>
<Panel.Title toggle>
This is the title of the panel
<i className="fa fa-angle-double-right" />
</Panel.Title>
</Panel.Heading>
<Panel.Collapse>
<Panel.Body>
This is the body of the panel
</Panel.Body>
</Panel.Collapse>
</Panel>
我希望 Panel.Title 中的字体 awesome <i> 在面板打开时自动在 fa-angle-double-right 和 fa-angle-double-down 之间切换,并在面板关闭时切换回来。但我似乎无法从面板标题访问面板的折叠状态。
【问题讨论】: