Angular ng-grid row height

前端 未结 6 2129
梦谈多话
梦谈多话 2020-12-09 09:29

is there any way to apply the height of the row in ng-grid according to its content. there is one option rowHeight which is changed the height of all row. But I want dynamic

6条回答
  •  臣服心动
    2020-12-09 09:57

    I wanted to chime in on this question. I have followed up on this example and have used the solution provided by getuliojr. This solution seems to work pretty well, note that you will have to clone the fork and build the source in order to use in your app. I have a plunker live of it working: http://plnkr.co/edit/nhujNRyhET4NT04Mv6Mo?p=preview

    Note you will also need to add 2 css rules:

    .ngCellText{
        white-space:normal !important;
        }
    
    .ngVerticalBarVisible{
          height: 100% !important;
        }
    

    I have yet to test this under significant load or cross-browser but will update with more once I do.

    GH Repo for ng-grid with flexible height by getuliojr: https://github.com/getuliojr/ng-grid/commits/master

提交回复
热议问题