mirror of
https://github.com/directus/directus.git
synced 2026-02-19 01:34:33 -05:00
Don't hide but set as readonly (#14834)
* Don't hide but set as readonly * Update app/src/views/private/components/drawer-item.vue Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com> * Add missing import Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
import api from '@/api';
|
||||
import { getRootPath } from '@/utils/get-root-path';
|
||||
import FilePreview from '@/views/private/components/file-preview.vue';
|
||||
import { set } from 'lodash';
|
||||
import { computed, defineComponent, PropType, ref, toRefs, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -177,8 +178,11 @@ export default defineComponent({
|
||||
|
||||
const fields = computed(() => {
|
||||
if (props.circularField) {
|
||||
return fieldsWithPermissions.value.filter((field: Field) => {
|
||||
return field.field !== props.circularField;
|
||||
return fieldsWithPermissions.value.map((field: Field) => {
|
||||
if (field.field === props.circularField) {
|
||||
set(field, 'meta.readonly', true);
|
||||
}
|
||||
return field;
|
||||
});
|
||||
} else {
|
||||
return fieldsWithPermissions.value;
|
||||
|
||||
Reference in New Issue
Block a user