Check if new table columns and rows are not empty
This commit is contained in:
parent
7ba6b9f6ad
commit
a1673f0805
|
@ -124,6 +124,16 @@ function reloadTable() {
|
|||
|
||||
|
||||
|
||||
createDialog.addEventListener("input", function(event) {
|
||||
if (event.target.value === "") {
|
||||
event.target.setCustomValidity("Please enter a value");
|
||||
} else {
|
||||
event.target.setCustomValidity("");
|
||||
}
|
||||
|
||||
event.target.checkValidity();
|
||||
});
|
||||
|
||||
createDialog.addEventListener("submit", function() {
|
||||
let columns = createDialog.querySelector("#cols").valueAsNumber;
|
||||
let rows = createDialog.querySelector("#rows").valueAsNumber;
|
||||
|
|
Loading…
Reference in New Issue