Skip to content

Commit

Permalink
updating the CSV row trim on paste logic to only occur when async pag…
Browse files Browse the repository at this point in the history
…ination is used
  • Loading branch information
OvidijusParsiunas committed Feb 20, 2024
1 parent 79be452 commit de9f7c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion component/src/utils/paste/CSV/overwriteCellsViaCSVOnPaste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export class OverwriteCellsViaCSVOnPaste {
clipboardText: string, event: ClipboardEvent, rowIndex: number, columnIndex: number) {
event.preventDefault();
let CSV = ParseCSVClipboardText.parse(clipboardText);
if (!at.displayAddNewRow) CSV = OverwriteCellsViaCSVOnPaste.trimCSVRowsIfCantCreateNew(CSV, at.data, rowIndex);
if (!at.displayAddNewRow && at._pagination._async) {
CSV = OverwriteCellsViaCSVOnPaste.trimCSVRowsIfCantCreateNew(CSV, at.data, rowIndex);
}
OverwriteCellsViaCSVOnPaste.focusOriginalCellAfterProcess(at,
InsertMatrix.insert.bind(this, at, CSV, rowIndex, columnIndex));
}
Expand Down

0 comments on commit de9f7c0

Please sign in to comment.