【问题标题】:AgGridReact style issue - Header under the cellsAgGridReact 样式问题 - 单元格下的标题
【发布时间】:2021-12-06 11:34:54
【问题描述】:

由于某种原因,当我添加 domLayout={'autoHeight'} 时,标题会显示,但行之间的每一行都有一个空格! 如果我删除该自动高度,则这些行还可以,并且在彼此下方没有问题,但是表格的标题位于表格第一行下方.... 我确实玩过它周围 DIV 的高度,从固定到 100%……不走运。

有办法吗?

【问题讨论】:

标签: reactjs ag-grid


【解决方案1】:
 [![<div
                    id="myGrid"
                    style={{
                        height: '100%',
                        width: '100%',
                    }}
                    className="ag-theme-balham-dark"
                >
                        <AgGridReact                            
                                columnDefs={columnDefs}               
                                rowData={ ...}
                                onGridReady={...}
                                onCellValueChanged={...}
                                onRowValueChanged={...}
                                toolPanelSuppressSideButtons={true}
                                enableColResize={true}
                                allowContextMenuWithControlKey={false} 
                                animateRows={true}    
                                domLayout= 'autoHeight'
                                getRowNodeId={this.getRowNodeId}
                                getContextMenuItems={this.getMyContextMenuItems.bind(this)}
                                             
                                overlayNoRowsTemplate={
                                    '<span style="color:dimgray;font-weight:bold"></span>'
                                  }
                            />                             
                   
                   </div>][![1\]][1]][1]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-26
    • 1970-01-01
    • 2010-12-23
    • 1970-01-01
    • 2019-01-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多