question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add configuration for defaultColumns, createFields to Lists

See original GitHub issue

At the moment, we’re showing all the fields as the default column set and in the create modal. It’s not particularly usable, and you can’t change it.

We’ve discussed a few different ideas here but for now I propose bringing forward two list options from Keystone 4: defaultColumns and createFields.

Both are space-separated lists of field paths, like this for your average User list config:

  fields: {
    name: { type: Text },
    email: { type: Text, isUnique: true },
    dob: {
      type: CalendarDay,
      format: 'Do MMMM YYYY',
      yearRangeFrom: 1901,
      yearRangeTo: getYear(new Date()),
    },
    password: { type: Password },
    isAdmin: { type: Checkbox },
    avatar: { type: File, adapter: avatarFileAdapter },
  },
  createFields: ['name', 'email', 'password', 'isAdmin'],
  defaultColumns: ['name', 'email', 'isAdmin'],
  labelResolver: item => `${item.name} <${item.email}>`,

Both could default to “all fields” as they currently do.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jesstelfordcommented, May 14, 2019

@dcousens #867 didn’t get merged. Gotta Cherry pick those changes out

0reactions
stale[bot]commented, Feb 18, 2020

It looks like there hasn’t been any activity here in over 6 months. Sorry about that! We’ve flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure the list layout - Product Documentation | ServiceNow
You can configure a list to choose which columns appear in a list, create list views, and create fields on the table.
Read more >
Create a column in a list or library - Microsoft Support
Add an existing site column to a list or library · Navigate to the list or library you want to create a column...
Read more >
im createfield - PTC Support
To create a computed field, you choose a field type to configure as a computed field. To specify a field type, use the...
Read more >
How insert default columns when creating a table in ...
I see several ways to add design helpers to your PDM: Add it to the Initialize event handler of the Table class; Create...
Read more >
Customize Related Lists - Salesforce Help
... columns displayed, column order, and record sort order of related lists on record detail pages in Salesforce and the Salesf... ... Filters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found