Remove log and add notification when creating or editing columns
This commit is contained in:
parent
5d554d0616
commit
7050c6713a
|
@ -182,8 +182,12 @@
|
||||||
indexes,
|
indexes,
|
||||||
})
|
})
|
||||||
dispatch("updatecolumns")
|
dispatch("updatecolumns")
|
||||||
|
if (originalName) {
|
||||||
|
notifications.success("Column updated successfully")
|
||||||
|
} else {
|
||||||
|
notifications.success("Column created successfully")
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
|
||||||
notifications.error(`Error saving column: ${err.message}`)
|
notifications.error(`Error saving column: ${err.message}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +203,7 @@
|
||||||
notifications.error("You cannot delete the display column")
|
notifications.error("You cannot delete the display column")
|
||||||
} else {
|
} else {
|
||||||
await tables.deleteField(editableColumn)
|
await tables.deleteField(editableColumn)
|
||||||
notifications.success(`Column ${editableColumn.name} deleted.`)
|
notifications.success(`Column ${editableColumn.name} deleted`)
|
||||||
confirmDeleteDialog.hide()
|
confirmDeleteDialog.hide()
|
||||||
hide()
|
hide()
|
||||||
deletion = false
|
deletion = false
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
let touched = false
|
let touched = false
|
||||||
|
|
||||||
$: firstColumn = $stickyColumn || $visibleColumns[0]
|
$: firstColumn = $stickyColumn || $visibleColumns[0]
|
||||||
|
|
||||||
$: console.log(firstColumn)
|
|
||||||
|
|
||||||
$: rowHovered = $hoveredRowId === "new"
|
$: rowHovered = $hoveredRowId === "new"
|
||||||
$: containsSelectedCell = $selectedCellId?.startsWith("new-")
|
$: containsSelectedCell = $selectedCellId?.startsWith("new-")
|
||||||
$: width = gutterWidth + ($stickyColumn?.width || 0)
|
$: width = gutterWidth + ($stickyColumn?.width || 0)
|
||||||
|
|
Loading…
Reference in New Issue