mirror of
https://github.com/directus/directus.git
synced 2026-01-27 12:58:03 -05:00
fix applying corresponding changes (#17392)
This commit is contained in:
@@ -2,6 +2,7 @@ import { StateUpdates, State, HelperFunctions } from '../types';
|
||||
import { set } from 'lodash';
|
||||
import { useCollectionsStore } from '@/stores/collections';
|
||||
import { useFieldsStore } from '@/stores/fields';
|
||||
import { setRelatedOneFieldForCorrespondingField } from './m2m';
|
||||
|
||||
export function applyChanges(updates: StateUpdates, state: State, helperFn: HelperFunctions) {
|
||||
const { hasChanged } = helperFn;
|
||||
@@ -37,6 +38,10 @@ export function applyChanges(updates: StateUpdates, state: State, helperFn: Help
|
||||
matchJunctionCollectionName(updates);
|
||||
}
|
||||
|
||||
if (hasChanged('fields.corresponding')) {
|
||||
setRelatedOneFieldForCorrespondingField(updates);
|
||||
}
|
||||
|
||||
if (
|
||||
[
|
||||
'relations.o2m.collection',
|
||||
|
||||
Reference in New Issue
Block a user