Merge branch 'master' of github.com:payloadcms/payload into feat/extensible-auth-strategies
This commit is contained in:
@@ -51,12 +51,18 @@ const optionsReducer = (state: Option[], action: Action): Option[] => {
|
||||
}
|
||||
return docs;
|
||||
},
|
||||
ids.map((id) => ({
|
||||
label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
|
||||
value: id,
|
||||
}))),
|
||||
[]),
|
||||
];
|
||||
|
||||
ids.forEach((id) => {
|
||||
if (!loadedIDs.includes(id)) {
|
||||
options.push({
|
||||
label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
|
||||
value: id,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return sort ? sortOptions(options) : options;
|
||||
}
|
||||
|
||||
@@ -78,14 +84,16 @@ const optionsReducer = (state: Option[], action: Action): Option[] => {
|
||||
}
|
||||
|
||||
return docs;
|
||||
},
|
||||
[
|
||||
...ids.map((id) => ({
|
||||
label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
|
||||
value: id,
|
||||
relationTo: relation,
|
||||
})),
|
||||
]);
|
||||
}, []);
|
||||
|
||||
ids.forEach((id) => {
|
||||
if (!loadedIDs.includes(id)) {
|
||||
newSubOptions.push({
|
||||
label: labelKey === 'id' ? id : `Untitled - ID: ${id}`,
|
||||
value: id,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (optionsToAddTo) {
|
||||
const subOptions = [
|
||||
|
||||
Reference in New Issue
Block a user