Skip to content

Commit

Permalink
kie-issues#365: Top-left cell data is getting lost after Cutting and …
Browse files Browse the repository at this point in the history
…Pasting to the DMN Editor's Boxed Expression Editor (#1799)
  • Loading branch information
yesamer authored Jun 27, 2023
1 parent 358f09f commit 3718574
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ export function BeeTableSelectionContextProvider({ children }: React.PropsWithCh
for (let r = startRow; r <= endRow; r++) {
clipboardMatrix[r - startRow] ??= [];
for (let c = startColumn; c <= endColumn; c++) {
clipboardMatrix[r - startRow] ??= [];
clipboardMatrix[r - startRow][c - startColumn] = [...(refs.current?.get(r)?.get(c) ?? [])]
?.flatMap((ref) => (ref.getValue ? [ref.getValue()] : []))
.join(""); // FIXME: What to do? Only one ref should be yielding the content. See https://github.com/kiegroup/kie-issues/issues/170
Expand All @@ -611,11 +610,11 @@ export function BeeTableSelectionContextProvider({ children }: React.PropsWithCh
for (let r = startRow; r <= endRow; r++) {
clipboardMatrix[r - startRow] ??= [];
for (let c = startColumn; c <= endColumn; c++) {
clipboardMatrix[r - startRow] ??= [];
clipboardMatrix[r - startRow][c - startColumn] = [...(refs.current?.get(r)?.get(c) ?? [])]
?.flatMap((ref) => {
const cellValue = ref.getValue ? [ref.getValue()] : [];
ref.setValue?.(CELL_EMPTY_VALUE);
return ref.getValue ? [ref.getValue()] : [];
return cellValue;
})
.join(""); // What to do? Only one ref should be yielding the content. See https://github.com/kiegroup/kie-issues/issues/170
}
Expand Down

0 comments on commit 3718574

Please sign in to comment.