mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +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 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
 | ||||
|  | ||||
| @ -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'], {}), [ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Pierre Noël
						Pierre Noël