mirror of
https://github.com/directus/directus.git
synced 2026-02-13 13:15:22 -05:00
Add localType to interfaces
This commit is contained in:
@@ -67,6 +67,7 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
if (inter.system === true) return false;
|
||||
|
||||
const matchesType = inter.types.includes(state.fieldData?.type || 'alias');
|
||||
const matchesLocalType = inter.localTypes?.includes(type);
|
||||
let matchesRelation = false;
|
||||
|
||||
if (type === 'standard' || type === 'presentation') {
|
||||
@@ -81,7 +82,7 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
matchesRelation = inter.relationship === type;
|
||||
}
|
||||
|
||||
return matchesType && matchesRelation;
|
||||
return matchesType && matchesRelation && (matchesLocalType === undefined || matchesLocalType);
|
||||
})
|
||||
.sort((a, b) => (a.name > b.name ? 1 : -1));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user