Skip to content

🐛 [Bug]: Grid 表格getRecordset方法updateRecords没有包含【拖拽】后影响的记录 #3924

@rocleegithub

Description

@rocleegithub

Version

3.27.0

Vue Version

3.5.25

Link to minimal reproduction

  <tiny-grid ref="grid"
    :data="tableData"
    row-key
    :drop-config="dropConfig"
    column-min-width="300px"
    :edit-config="{
      trigger: 'click',
      mode: 'cell',
      showStatus: true,
      markInsert: true
    }"
  >

Step to reproduce

import Sortable from 'sortablejs'

const dropConfig = ref({
  plugin: Sortable,
  row: true,
  rowHandle: 'index',
  column: false // 取消列拖拽
})

const grid= ref();
const waitSave = computed(() => {
  if (!grid.value)
    return false
  const data = grid.value.getRecordset()

  return data.insertRecords.length > 0 || data.removeRecords.length > 0 || data.updateRecords.length > 0
})

What is expected

No response

What is actually happening

No response

What is your project name

WMS

Any additional comments (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions