mirror of
https://github.com/strapi/strapi.git
synced 2025-08-02 13:58:18 +00:00
allow components in the list view
This commit is contained in:
parent
828b143bb2
commit
0dba1fc644
@ -8,7 +8,7 @@ const { PUBLISHED_AT_ATTRIBUTE } = contentTypesUtils.constants;
|
|||||||
const NON_SORTABLES = ['component', 'json', 'media', 'richtext', 'dynamiczone'];
|
const NON_SORTABLES = ['component', 'json', 'media', 'richtext', 'dynamiczone'];
|
||||||
const SORTABLE_RELATIONS = ['oneToOne', 'manyToOne'];
|
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'];
|
const LISTABLE_RELATIONS = ['oneToOne', 'oneToMany', 'manyToOne', 'manyToMany'];
|
||||||
|
|
||||||
// hidden fields are fields that are configured to be hidden from list, and edit views
|
// hidden fields are fields that are configured to be hidden from list, and edit views
|
||||||
|
@ -19,7 +19,7 @@ function createDefaultMetadatas(schema) {
|
|||||||
id: {
|
id: {
|
||||||
edit: {},
|
edit: {},
|
||||||
list: {
|
list: {
|
||||||
label: 'Id',
|
label: 'id',
|
||||||
searchable: true,
|
searchable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
@ -29,7 +29,7 @@ function createDefaultMetadatas(schema) {
|
|||||||
|
|
||||||
function createDefaultMetadata(schema, name) {
|
function createDefaultMetadata(schema, name) {
|
||||||
const edit = {
|
const edit = {
|
||||||
label: _.upperFirst(name),
|
label: name,
|
||||||
description: '',
|
description: '',
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
visible: isVisible(schema, name),
|
visible: isVisible(schema, name),
|
||||||
@ -59,7 +59,7 @@ function createDefaultMetadata(schema, name) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const list = {
|
const list = {
|
||||||
label: _.upperFirst(name),
|
label: name,
|
||||||
searchable: isSearchable(schema, name),
|
searchable: isSearchable(schema, name),
|
||||||
sortable: isSortable(schema, name),
|
sortable: isSortable(schema, name),
|
||||||
..._.pick(_.get(schema, ['config', 'metadatas', name, 'list'], {}), [
|
..._.pick(_.get(schema, ['config', 'metadatas', name, 'list'], {}), [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user