react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

Row reordering does not use column formatters

Open therahl opened this issue 10 years ago • 1 comments

I'm submitting a ... (check one with "x")

[x ] bug report

Current behavior Currently, row reordering does not use column formatters to display the rows while dragging. This can result in an invariant violation when using an object as the cell value. Additionally, the dragged rows show all of the row attributes that are on the row object. This may be undesired in instances where some columns may be hidden and therefore should not be shown while dragging.

Expected/desired behavior Using custom formatters should not result in an invariant violation when dragging.

Reproduction of the problem This can be reproduced by using an object as a cell value in the row reordering example:

//helper to create a fixed number of rows
function createRows(numberOfRows){
  var _rows = [];
  for (var i = 1; i < numberOfRows; i++) {
    _rows.push({
      id: i,
      task: { value: 'Task ' + i },
      complete: Math.min(100, Math.round(Math.random() * 110)),
      priority : ['Critical', 'High', 'Medium', 'Low'][Math.floor((Math.random() * 3) + 1)],
      issueType : issueTypes[Math.floor((Math.random() * 3) + 1)],
      startDate: randomDate(new Date(2015, 3, 1), new Date()),
      completeDate: randomDate(new Date(), new Date(2016, 0, 1))
    });
  }
  return _rows;
}

therahl avatar Sep 19 '16 21:09 therahl

Looks like this was merged, thanks.

therahl avatar Sep 23 '16 15:09 therahl