Deleting a row from an elementui table triggers the chang event of the select component in the next row of the table

clipboard.png

if there are two rows inside the table above, if the select values of the two rows are not the same, deleting the first row will trigger the change event of the following line select. It will cause me to think that the next row of data has changed, and I will submit this piece of data to the background. Although it does not affect the data itself, it will submit a lot of data to the backend, which will have an impact on the efficiency of the backend. Is there any good way to solve it? I don"t know if this is a bug of elementui.

// 
this.multipleSelection.map((item, index) => {
  if (item.VVMP_ID) {
    item.VVMP_IS_DELETE = true
    this.delList.push(item)
  }
  for (let i = this.list.length - 1; i > -1; i--) {
    if (item.VVMP_ID) {
      if (item.VVMP_ID === this.list[i].VVMP_ID) {
        this.list.splice(i, 1)
        break
      }
    } else {
      if (item.key === this.list[i].key) {
        this.list.splice(i, 1)
        break
      }
    }
  }
})
Oct.08,2021

did you use the subscript of the list as the key?

Menu