A plugin for Payload CMS that adds a "Reset Preferences" button to collection list views, allowing users to reset their list view preferences to the default state.
- Adds a "Reset Preferences" button to the list view menu of collections
- Allows users to quickly reset their list view preferences (columns, filters, pagination, etc.)
- Configurable to include or exclude specific collections
npm install @shefing/reset-list-view
# or
yarn add @shefing/reset-list-view
# or
pnpm add @shefing/reset-list-viewAdd the plugin to your Payload config:
import { buildConfig } from 'payload/config'
import { CollectionResetPreferencesPlugin } from '@shefing/reset-list-view'
export default buildConfig({
plugins: [
CollectionResetPreferencesPlugin({
// Plugin options here
}),
],
// Rest of your Payload config
})The plugin accepts the following configuration options:
| Option | Type | Description | Default |
|---|---|---|---|
disabled |
boolean |
Disable the plugin | false |
includedCollections |
string[] |
List of collection slugs to add the reset button to. If provided, only these collections will have the reset button. | undefined |
excludedCollections |
string[] |
List of collection slugs to exclude from having the reset button. Only used if includedCollections is not provided. |
undefined |
Add the reset button to all collections:
CollectionResetPreferencesPlugin()Add the reset button to specific collections:
CollectionResetPreferencesPlugin({
includedCollections: ['posts', 'categories'],
})Exclude specific collections from having the reset button:
CollectionResetPreferencesPlugin({
excludedCollections: ['users', 'media'],
})Disable the plugin:
CollectionResetPreferencesPlugin({
disabled: true,
})The plugin adds a "Reset Preferences" button to the list view menu of collections. When clicked, the button makes a DELETE request to the Payload API to delete the user's preferences for that collection's list view, and then reloads the page. This resets the list view to its default state, clearing any custom column configurations, filters, pagination settings, etc.
See the consolidated ROADMAP.md at the repo root and the live RoadMap issues for Reset List View.
- Granular reset menu — split into
Reset columns,Reset filters,Reset sort,Reset page size,Reset all. - Per-user default preset — admin can save a view and force it as the default for everyone.
- Named saved views per user with a quick switcher — pairs with QuickFilter saved presets.
- Auto-reset on logout option for shared workstations.
- Admin button to bulk-reset preferences for all users (e.g., after a schema change).
MIT