Browse Source

fix: allow dragging to grid end (#8745)

Signed-off-by: mertmit <mertmit99@gmail.com>
Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/8747/head
Mert E 2 weeks ago committed by GitHub
parent
commit
bdd0a4b6bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts

2
packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts

@ -58,7 +58,7 @@ export const useColumnDrag = ({
const lastViewCol = gridViewCols.value[lastCol.id!]
// if nextToViewCol/toViewCol is null, return
if (nextToViewCol === null || lastViewCol === null) return
if (nextToViewCol === null && lastViewCol === null) return
const newOrder = nextToViewCol ? toViewCol.order! + (nextToViewCol.order! - toViewCol.order!) / 2 : lastViewCol.order! + 1
const oldOrder = toBeReorderedViewCol.order

Loading…
Cancel
Save