Skip to content

Commit

Permalink
Merge pull request #224 from unoplatform/dev/xygu/20241114/datagrid-c…
Browse files Browse the repository at this point in the history
…ell-mia-on-resize

fix(DataGrid): not displaying cells from last columns when resized from scrolled state
  • Loading branch information
jeromelaban authored Nov 18, 2024
2 parents d6d5f8b + 9d63dc2 commit 0216730
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,14 @@ private bool ComputeDisplayedColumns()
_horizontalOffset -= GetEdgedColumnWidth(dataGridColumn);
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleScrollingColumn(dataGridColumn);
}

if (_horizontalOffset == 0 && cx < displayWidth)
{
// if the columns have been scrolled, and all visible columns are fully rendered in the available space,
// then HorizontalAdjustment needs to be updated so that DataGridCellsPresenter.ShouldDisplayCell
// don't hide columns based on the old value.
HorizontalAdjustment = displayWidth - cx;
}
}

// third try to partially scroll in first scrolled off column
Expand Down

0 comments on commit 0216730

Please sign in to comment.