allow components in the list view

This commit is contained in:
Pierre Noël 2022-01-10 12:06:36 +01:00
parent 828b143bb2
commit 0dba1fc644
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ const { PUBLISHED_AT_ATTRIBUTE } = contentTypesUtils.constants;
const NON_SORTABLES = ['component', 'json', 'media', 'richtext', 'dynamiczone'];
const SORTABLE_RELATIONS = ['oneToOne', 'manyToOne'];
const NON_LISTABLES = ['component', 'json', 'password', 'richtext', 'dynamiczone'];
const NON_LISTABLES = ['json', 'password', 'richtext', 'dynamiczone'];
const LISTABLE_RELATIONS = ['oneToOne', 'oneToMany', 'manyToOne', 'manyToMany'];
// hidden fields are fields that are configured to be hidden from list, and edit views

View File

@ -19,7 +19,7 @@ function createDefaultMetadatas(schema) {
id: {
edit: {},
list: {
label: 'Id',
label: 'id',
searchable: true,
sortable: true,
},
@ -29,7 +29,7 @@ function createDefaultMetadatas(schema) {
function createDefaultMetadata(schema, name) {
const edit = {
label: _.upperFirst(name),
label: name,
description: '',
placeholder: '',
visible: isVisible(schema, name),
@ -59,7 +59,7 @@ function createDefaultMetadata(schema, name) {
);
const list = {
label: _.upperFirst(name),
label: name,
searchable: isSearchable(schema, name),
sortable: isSortable(schema, name),
..._.pick(_.get(schema, ['config', 'metadatas', name, 'list'], {}), [