Remove log and add notification when creating or editing columns

This commit is contained in:
Andrew Kingston 2023-03-31 13:21:53 +01:00
parent 5d554d0616
commit 7050c6713a
2 changed files with 6 additions and 5 deletions

View File

@ -182,8 +182,12 @@
indexes,
})
dispatch("updatecolumns")
if (originalName) {
notifications.success("Column updated successfully")
} else {
notifications.success("Column created successfully")
}
} catch (err) {
console.log(err)
notifications.error(`Error saving column: ${err.message}`)
}
}
@ -199,7 +203,7 @@
notifications.error("You cannot delete the display column")
} else {
await tables.deleteField(editableColumn)
notifications.success(`Column ${editableColumn.name} deleted.`)
notifications.success(`Column ${editableColumn.name} deleted`)
confirmDeleteDialog.hide()
hide()
deletion = false

View File

@ -26,9 +26,6 @@
let touched = false
$: firstColumn = $stickyColumn || $visibleColumns[0]
$: console.log(firstColumn)
$: rowHovered = $hoveredRowId === "new"
$: containsSelectedCell = $selectedCellId?.startsWith("new-")
$: width = gutterWidth + ($stickyColumn?.width || 0)