angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.47k forks source link

expand lead to reRender when Tree View and Select both enabled in ui-grid #6521

Open sunscheung opened 6 years ago

sunscheung commented 6 years ago

This question is difficult for me to describe, so I'll show it with pictures and examples and look forward to your answers: 1、 init data
image

2、 unselect one image

3、 collapseAll image

4、expand Or resize column (enableColumnResizing:true): the ui-grid rerender and it's not what I want to see.... image

example: http://embed.plnkr.co/F4dcfV/ http://embed.plnkr.co/F4dcfV/ @is @petebacondarwin @nateabele @sbruno @rubenv

m4m4m4 commented 6 years ago

You are using isRowSelectable wrong. Change it to return a boolean:

isRowSelectable: function(row) {
      if (row.entity.selected && row.entity.isLeaf) {
        //row.grid.api.selection.selectRow(row.entity); // 选中行
        true
      }
    },