keystonejs / keystone-classic

Node.js CMS and web app framework
http://v4.keystonejs.com
MIT License
14.62k stars 2.21k forks source link

Not able to use attribute of location field as default column? #4962

Open emaddoma opened 5 years ago

emaddoma commented 5 years ago

Expected behavior

Display attribute of field as defautlt column. Keystone v3 supported this.

Actual/Current behavior

This no longer works in Keystone 4.

Steps to reproduce the actual/current behavior

`'use strict';

const keystone = require('keystone');

const Types = keystone.Field.Types;

/**

const EventLocation = new keystone.List('EventLocation', { map: { name: 'location.name' }, track: true

});

EventLocation.add({ location: { type: Types.Location, enableMapsAPI: true, initial: true, collapse: false } });

EventLocation.defaultColumns = 'location.name, location.suburb, location.state'; EventLocation.register(); `

Environment

Keystone 4.2.1 Node 8 Admin UI