Reorder columns in collections

default discord avatar
CAPTKEN12 months ago
4

How do you reorder the columns in a collections - for example in the Users Collection - hide ID - then arrange Full Name | Email | Address | Phone number in this order? Thanks

  • default discord avatar
    yhn579012 months ago
    admin: {
       defaultColumns: ["fullName", "email", "address", "phoneNumber"],
        },

    Use the default columns field inside collections admin object.



    If you are an existing user then the previous order would be stored in

    _preferences

    table so in such cases you would have unselect all the options in columns in the list view and add it back in the order you want.

  • discord user avatar
    jacobsfletch
    12 months ago

    Columns are drag and drop, so you shouldn’t have to deselect and reselect, instead just drag them into your preferred order. Your changes will save to your user’s preferences as @yhn5790 mentioned.

    defaultColumns

    is used to initialize which columns are enabled by default and the order they appear for users without saved preferences.

  • default discord avatar
    CAPTKEN12 months ago

    Many thanks for the pointers - works great

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.