Fix singleton use on collections detail

This commit is contained in:
rijkvanzanten
2020-08-13 11:36:24 -04:00
parent 2d59995468
commit 81f0cc147b
4 changed files with 22 additions and 14 deletions

View File

@@ -17,7 +17,7 @@ export function useItem(collection: Ref<string>, primaryKey: Ref<string | number
const edits = ref({});
const isNew = computed(() => primaryKey.value === '+');
const isBatch = computed(() => typeof primaryKey.value === 'string' && primaryKey.value.includes(','));
const isSingle = computed(() => !!collectionInfo.value?.meta?.single);
const isSingle = computed(() => !!collectionInfo.value?.meta?.singleton);
const endpoint = computed(() => {
return collection.value.startsWith('directus_')