added Command+S quick save alias and fixed relations draft restore
This commit is contained in:
@@ -101,7 +101,8 @@
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
function replaceOriginal(newOriginal) {
|
||||
async function replaceOriginal(newOriginal) {
|
||||
setErrors({}); // reset errors
|
||||
original = newOriginal || new Record();
|
||||
uploadedFilesMap = {};
|
||||
deletedFileIndexesMap = {};
|
||||
@@ -115,6 +116,9 @@
|
||||
record[k] = newOriginal[k];
|
||||
}
|
||||
|
||||
// wait to populate the fields to get the normalized values
|
||||
await tick();
|
||||
|
||||
originalSerializedData = JSON.stringify(record);
|
||||
|
||||
deleteDraft();
|
||||
@@ -353,7 +357,7 @@
|
||||
}
|
||||
|
||||
function handleFormKeydown(e) {
|
||||
if (e.ctrlKey && e.code == "KeyS") {
|
||||
if ((e.ctrlKey || e.metaKey) && e.code == "KeyS") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
save(false);
|
||||
|
||||
Reference in New Issue
Block a user