Is there a way to hide the identity column in Keystone.js?

I'm having trouble trying to hide an identifier column automatically created using the Keystone list template. Is there any way to suppress this column? The documentation is pretty scarce, covering only the basic use of the framework.

+7
express keystonejs
source share
1 answer

The Identifier column appears when there is no "name" field that can be used to refer to the presentation of information in the administrator user interface (or when the name field is not displayed).

You cannot hide it, or rather, we need something that can be used to attach the link. You can, however, replace it with any other name or text field using the map function.

For example, if you want to use the key column as a β€œbinding” / identifier property in your model:

 var MyList = new keystone.List('MyList', { map: { name: 'key' } }); MyList.add({ key: String // this will be used wherever a "name" is required, instead of the ID }); 

It is expanded in List Options in documents.

+11
source share

All Articles