mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-25 06:20:25 +01:00
allow new duplicated collection to edit the collection of relation fields
This commit is contained in:
1 parent
6212276c82
commit
3668e1c431
8 files changed
+14
-8
No files matched your search
@@ -231,6 +231,12 @@ function collectionUpsertModal(rawCollection, modalSettings) {
|
||||
clone.created = "";
|
||||
clone.updated = "";
|
||||
|
||||
// reset field ids
|
||||
// (in case the field relies on the id to dinstinguish new vs old)
|
||||
clone.fields?.forEach((field) => {
|
||||
delete field.id;
|
||||
});
|
||||
|
||||
// updated indexes ids
|
||||
clone.indexes = clone.indexes?.map((idx) => {
|
||||
return app.utils.replaceIndexFields(idx, (parsed) => {
|
||||
|
||||
Reference in new issue
Block a user