fix: table selector (#612)
This commit is contained in:
parent
451d6ae974
commit
68d35cf597
@ -63,8 +63,10 @@ export const TableSelectorProvider = (props) => {
|
|||||||
if (appends?.length) {
|
if (appends?.length) {
|
||||||
params['appends'] = appends;
|
params['appends'] = appends;
|
||||||
}
|
}
|
||||||
|
console.log('record', record);
|
||||||
if (collectionField) {
|
if (collectionField) {
|
||||||
if (['oho', 'o2m'].includes(collectionField.interface)) {
|
if (['oho', 'o2m'].includes(collectionField.interface)) {
|
||||||
|
if (record?.[collectionField.sourceKey]) {
|
||||||
params['filter'] = {
|
params['filter'] = {
|
||||||
$or: [{
|
$or: [{
|
||||||
[collectionField.foreignKey]: {
|
[collectionField.foreignKey]: {
|
||||||
@ -76,10 +78,17 @@ export const TableSelectorProvider = (props) => {
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
params['filter'] = {
|
||||||
|
[collectionField.foreignKey]: {
|
||||||
|
$is: null,
|
||||||
}
|
}
|
||||||
if (['obo'].includes(collectionField.interface)) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// if (['obo'].includes(collectionField.interface)) {
|
||||||
|
// }
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<BlockProvider {...props} params={params}>
|
<BlockProvider {...props} params={params}>
|
||||||
<InternalTableSelectorProvider {...props} params={params} />
|
<InternalTableSelectorProvider {...props} params={params} />
|
||||||
|
Loading…
Reference in New Issue
Block a user