[#4462] fixed Admin UI record and collection panels not reinitializing properly on browser back/forward navigation

This commit is contained in:
Gani Georgiev
2024-03-01 16:59:05 +02:00
parent 9babca5f77
commit bb410e7e0d
36 changed files with 124 additions and 92 deletions
@@ -75,7 +75,7 @@
// update indexes on collection rename
$: if (collection.name && original?.name != collection.name && collection.indexes.length > 0) {
collection.indexes = collection.indexes?.map((idx) =>
CommonHelper.replaceIndexTableName(idx, collection.name)
CommonHelper.replaceIndexTableName(idx, collection.name),
);
}
@@ -97,6 +97,11 @@
return collectionPanel?.hide();
}
export function forceHide() {
confirmClose = false;
hide();
}
async function load(model) {
setErrors({}); // reset errors
@@ -151,7 +156,7 @@
hide();
addSuccessToast(
!collection.id ? "Successfully created collection." : "Successfully updated collection."
!collection.id ? "Successfully created collection." : "Successfully updated collection.",
);
dispatch("save", {