mirror of
https://github.com/teableio/teable.git
synced 2026-02-05 04:50:41 +08:00
fix(v2): show link relation triggers in explain
This commit is contained in:
parent
d970fa66d4
commit
eb99bf97dc
@ -123,8 +123,25 @@ export const buildComputedUpdateReason = (
|
||||
}
|
||||
}
|
||||
|
||||
const implicitLinkSeedIds = new Set<string>();
|
||||
for (const fieldId of targetFieldIds) {
|
||||
const meta = fieldsById.get(fieldId.toString());
|
||||
if (!meta || meta.type !== 'link') {
|
||||
continue;
|
||||
}
|
||||
const targetId = fieldId.toString();
|
||||
if (seedFieldIdSet.has(targetId)) {
|
||||
implicitLinkSeedIds.add(targetId);
|
||||
}
|
||||
const symmetricFieldId = meta.options?.symmetricFieldId;
|
||||
if (symmetricFieldId && seedFieldIdSet.has(symmetricFieldId)) {
|
||||
implicitLinkSeedIds.add(symmetricFieldId);
|
||||
}
|
||||
}
|
||||
|
||||
const effectiveSeedIds = new Set<string>([...seededDependencyIds, ...implicitLinkSeedIds]);
|
||||
const seedFields: ComputedUpdateSeedField[] = changedFieldIds
|
||||
.filter((fieldId) => seededDependencyIds.has(fieldId.toString()))
|
||||
.filter((fieldId) => effectiveSeedIds.has(fieldId.toString()))
|
||||
.map((fieldId) => {
|
||||
const meta = fieldsById.get(fieldId.toString());
|
||||
const tableId = meta?.tableId ?? plan.seedTableId;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user