mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-03 22:17:08 +00:00
refactor(gui): code refactoring
Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
@@ -1040,14 +1040,14 @@ export default {
|
||||
await this.api.delete(id)
|
||||
}
|
||||
this.data.splice(this.rowContextMenu.index, 1)
|
||||
this.$toast.success('Deleted row successfully').goAway(3000)
|
||||
// this.$toast.success('Deleted row successfully').goAway(3000)
|
||||
} catch (e) {
|
||||
this.$toast.error(`Failed to delete row : ${e.message}`).goAway(3000)
|
||||
}
|
||||
},
|
||||
async deleteSelectedRows() {
|
||||
let row = this.rowLength
|
||||
let success = 0
|
||||
// let success = 0
|
||||
while (row--) {
|
||||
try {
|
||||
const { row: rowObj, rowMeta } = this.data[row]
|
||||
@@ -1064,12 +1064,12 @@ export default {
|
||||
await this.api.delete(id)
|
||||
}
|
||||
this.data.splice(row, 1)
|
||||
success++
|
||||
// success++
|
||||
} catch (e) {
|
||||
return this.$toast.error(`Failed to delete row : ${e.message}`).goAway(3000)
|
||||
}
|
||||
}
|
||||
if (success) { this.$toast.success(`Deleted ${success} selected row${success > 1 ? 's' : ''} successfully`).goAway(3000) }
|
||||
// if (success) { this.$toast.success(`Deleted ${success} selected row${success > 1 ? 's' : ''} successfully`).goAway(3000) }
|
||||
},
|
||||
|
||||
async clearCellValue() {
|
||||
|
||||
Reference in New Issue
Block a user