使用react-bootstrap扩展表内的行

ilb*_*nte 6 html-table twitter-bootstrap reactjs react-bootstrap

我正在尝试使用react-bootsrap在react中实现类似的目标:http://www.bootply.com/T0v2NlXryW

我的反应代码现在是这样的,但不起作用:

<Table>
<thead>
    <tr>
        <th>Job Name</th>
        <th>Description</th>
        <th>Provider Name</th>
        <th>Region</th>
        <th>Status</th>
    </tr>
</thead>
<tbody>
    <tr data-toggle="collapse" data-target="#demo1" className="accordion-toggle">
        <td>OBS Name</td>
        <td>OBS Description</td>
        <td>hpcloud</td>
        <td>nova</td>
        <td> created</td>
    </tr>
    <tr>
        <td colspan="12" className="hiddenRow">
            <div className="accordian-body collapse" id="demo1">
                <h1>Hi from the hiddenRow</h1>
            </div>
        </td>
    </tr>
</tbody></Table>
Run Code Online (Sandbox Code Playgroud)

表显示正确,但行在单击时不会展开。

fro*_*dit 1

您的代码对我有用 - 单击时会切换隐藏行。查看此 Bootply:http://www.bootply.com/QZPe6DSp1F

也许您没有加载 JQuery?