Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-01-06 13:11:37 +00:00
commit 1513568caa
2 changed files with 12 additions and 12 deletions

View File

@ -171,10 +171,10 @@ export const TargetKey = observer(
setOptions(
getCollection(target)
.fields?.filter((v) => {
if (type !== 'hasMany') {
return v.primaryKey || v.unique;
if (v.primaryKey || v.unique) {
return true;
}
return supportTypes.includes(v.type);
return type === 'hasMany' && supportTypes.includes(v.type);
})
.map((k) => {
return {
@ -196,10 +196,10 @@ export const TargetKey = observer(
setOptions(
getCollection(target)
.fields?.filter((v) => {
if (type !== 'hasMany') {
return v.primaryKey || v.unique;
if (v.primaryKey || v.unique) {
return true;
}
return supportTypes.includes(v.type);
return type === 'hasMany' && supportTypes.includes(v.type);
})
.map((k) => {
return {

View File

@ -161,10 +161,10 @@ export const TargetKey = observer(
setOptions(
getCollection(target, dataSourceKey)
.fields?.filter((v) => {
if (type !== 'hasMany') {
return v.primaryKey || v.unique;
if (v.primaryKey || v.unique) {
return true;
}
return supportTypes.includes(v.type);
return type === 'hasMany' && supportTypes.includes(v.type);
})
.map((k) => {
return {
@ -196,10 +196,10 @@ export const TargetKey = observer(
setOptions(
data.data
?.filter((v) => {
if (type !== 'hasMany') {
return v.primaryKey || v.unique;
if (v.primaryKey || v.unique) {
return true;
}
return supportTypes.includes(v.type);
return type === 'hasMany' && supportTypes.includes(v.type);
})
.map((k) => {
return {