How to make ag-grid autoHeight in infinity mode

若如初见. 提交于 2020-06-29 03:39:13

问题


I wanted to make my table height auto using ag-grid. for your information i am using ag-grid infinity mode for rendering table.

I am using ag-grid for vanilla javascript. I already tried the autoHeight that is suggested by documentation but it doesn't work.

column_defs: [
  {
    autoHeight: true,
    cellStyle: {"white-space": "normal"},
    field: "paragraph",
    headerName: "paragraph",
    width: 100
  }
]

var gridOptions = {
        defaultColDef: {
            sortable: true,
            filter: 'agTextColumnFilter',
            filterParams:{
              filterOptions:['contains'],
              debounceMs:500,
              suppressAndOrCondition: true
            },
            cellStyle: {'white-space': 'normal', 'word-wrap': 'break-word'},
            resizable: true,
            editable: true
        },
        components:{
            loadingRenderer:function(params) {
                if (params.value !== undefined) {
                    return params.value;
                } else {
                    return '<img src="../images/loading.gif">';
                }
            }
        },
        //debug: true,
        columnDefs: columnDefs,
        pagination: true,
        rowModelType: 'infinite',
        onColumnResized: onColumnResized
    };

i still got the row not set to auto height but using default height.

来源:https://stackoverflow.com/questions/57705286/how-to-make-ag-grid-autoheight-in-infinity-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!