Skip to content

Commit

Permalink
Merge pull request strapi#12155 from strapi/content-16/display-repeat…
Browse files Browse the repository at this point in the history
…able-components

Allow components in the list view
  • Loading branch information
gu-stav authored Feb 4, 2022
2 parents 73b2d7f + 6e23efe commit 6343ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createDefaultMetadatas(schema) {
id: {
edit: {},
list: {
label: 'Id',
label: 'id',
searchable: true,
sortable: true,
},
Expand All @@ -29,7 +29,7 @@ function createDefaultMetadatas(schema) {

function createDefaultMetadata(schema, name) {
const edit = {
label: _.upperFirst(name),
label: name,
description: '',
placeholder: '',
visible: isVisible(schema, name),
Expand Down Expand Up @@ -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'], {}), [
Expand Down

0 comments on commit 6343ce5

Please sign in to comment.