I'm having troubles trying to hide the ID column, auto-generated by Keystone List template. Is there a way to suppress this column? The documentation is pretty scant covering only basic usage of the framework.
The ID column shows up when there isn't a "name" field that can be used to link to the details view in the Admin UI (or when the name field isn't being displayed).
You can't hide it, or rather we need something that can be used to attach the link to. You can, however replace it with any other name
or text
field using the map
feature.
For example, if you wanted to use a key
column as the "linking" / 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's covered in the List Options in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With