mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 09:35:36 -05:00
Returning EditCell in EditRows (#302)
Instead of returning DbCellValues inside an EditRow, we should be returning EditCells. This way we can preserve dirty state when scrolling.
This commit is contained in:
@@ -130,9 +130,13 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement
|
||||
public override EditRow GetEditRow(DbCellValue[] cachedRow)
|
||||
{
|
||||
// Iterate over the new cells. If they are null, generate a blank value
|
||||
DbCellValue[] editCells = newCells.Select(cell => cell == null
|
||||
? new DbCellValue {DisplayValue = string.Empty, IsNull = false, RawObject = null}
|
||||
: cell.AsDbCellValue)
|
||||
EditCell[] editCells = newCells.Select(cell =>
|
||||
{
|
||||
DbCellValue dbCell = cell == null
|
||||
? new DbCellValue {DisplayValue = string.Empty, IsNull = false, RawObject = null}
|
||||
: cell.AsDbCellValue;
|
||||
return new EditCell(dbCell, true);
|
||||
})
|
||||
.ToArray();
|
||||
return new EditRow
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user