From 41b9971cf3d2f30fa32121fd3095117070c84203 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 18 Aug 2022 15:04:00 +0530 Subject: [PATCH] fix/pr review included --- .../components/smartsheet/sidebar/toolbar/AddRow.vue | 10 ++++++---- packages/nc-gui-v2/composables/useViewData.ts | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue index 4aed551e22..dffca10e5e 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/AddRow.vue @@ -1,9 +1,14 @@ diff --git a/packages/nc-gui-v2/composables/useViewData.ts b/packages/nc-gui-v2/composables/useViewData.ts index a0d3390b7a..70eac6ceda 100644 --- a/packages/nc-gui-v2/composables/useViewData.ts +++ b/packages/nc-gui-v2/composables/useViewData.ts @@ -214,11 +214,13 @@ export function useViewData( oldRow: {}, rowMeta: { new: true }, }) + return formattedData.value[addAfter] } const removeLastEmptyRow = () => { const lastRow = formattedData.value[formattedData.value.length - 1] + if (lastRow.rowMeta.new) { formattedData.value.pop() }