0.1.2 • Published 3 years ago

@globobeet/keystone-sortable-list-plugin v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Keystone Sortable List Plugin

Add a custom sort field to your Keystone lists!

How it works

  • Resolves conflicts by incrementing existing records
  • Sets sort value to 1 + maximum existing sort value by default (for new, or existing records with previous values)

Usage

const sortable = require('@globobeet/keystone-sortable-list-plugin');

keystone.createList('ListWithPlugin', {
  fields: {...},
  plugins: [
    sortable({...}),
  ],
});

Config

OptionTypeDefaultDescription
fieldNameStringsortOrderName of the field to use for sorting
accessObjectSee: accessChange default access controls

access

By default access control on at tracking fields is read/write:

{
  read: true,
  create: true,
  update: true
}