【问题标题】:Add a div to the top of react bootstrap table在反应引导表的顶部添加一个 div
【发布时间】:2020-05-12 04:19:23
【问题描述】:

我正在使用这个 react-bootstrap 表: 它的 HTML 代码是:

 <Table striped bordered hover>
                <thead>

我试图在此处添加代码。

                   <tr>
                    <th>#</th>
                    <th>App</th>
                    <th>Domain Name</th>
                    <th>Pub Account ID</th>
                    <th>Relationship</th>
                    <th>Certification ID</th>
                    <th>Last update</th>
                    <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                    <th scope="row"><input type="checkbox" id={'checkboxThick'+network.id} onClick={()=>this.checkCheckbox(network.id)}/></th>
                    <td>{network.product}</td>
                    <td>{network.domain_Name}</td>
                    <td>{network.publisher_Id}</td>
                    <td>{network.relationship}</td>
                    <td>{network.certification_Id}</td>
                    <td>{network.lastUpdate}</td>
                    <td className="actionCoulmn">
                    </td>
                </tr>
                </tbody>
            </Table>

我需要将此 div 添加为表格的一部分:

我试图向 &lt;tr&gt;&lt;th&gt; 添加一些 div 和样式,但没有成功。 有人知道如何处理吗?

【问题讨论】:

    标签: html css reactjs bootstrap-4 react-bootstrap


    【解决方案1】:

    你可以解决这个问题:

      <div id="parent">
         <div /> // your div here
         <table /> // your existing table component
       </div>
    

    并使用样式来合并它们

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-02
      • 2021-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-27
      • 1970-01-01
      相关资源
      最近更新 更多