[#4160] fixed the Admin UI auto indexes update when renaming fields with a common prefix

This commit is contained in:
Gani Georgiev committed 2024-01-16 12:50:44 +02:00
1 parent 931f6bc0cb
commit 9419d1928a
33 files changed
+50 -40

No files matched your search

@@ -80,9 +80,14 @@
return;
}
// field with the old name exists so there is no need to rename index columns
if (!!collection?.schema?.find((f) => f.name == oldName && !f.toDelete)) {
return;
}
// update indexes on renamed fields
collection.indexes = collection.indexes.map((idx) =>
CommonHelper.replaceIndexColumn(idx, oldName, newName)
CommonHelper.replaceIndexColumn(idx, oldName, newName),
);
}
</script>