From b642b653d02c1bc75356f020c674e1f5fe2f7f63 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 3 Oct 2025 19:52:57 +0200 Subject: [PATCH] Add enableCustomListView option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/index.ts b/src/index.ts index 3b03e47..d1a1627 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,11 @@ export type PayloadFeatureFlagsConfig = { * Override collection configuration */ collectionOverrides?: CollectionOverrides + /** + * Enable custom list view for feature flags + * @default false + */ + enableCustomListView?: boolean } export const payloadFeatureFlags = @@ -44,6 +49,7 @@ export const payloadFeatureFlags = defaultValue = false, enableRollouts = true, enableVariants = true, + enableCustomListView = false, collectionOverrides, } = pluginOptions @@ -163,6 +169,14 @@ export const payloadFeatureFlags = useAsTitle: 'name', group: 'Configuration', description: 'Manage feature flags for your application', + components: enableCustomListView ? { + ...collectionOverrides?.admin?.components, + views: { + list: { + Component: '@xtr-dev/payload-feature-flags/views#FeatureFlagsView' + } + } + } : (collectionOverrides?.admin?.components || {}), ...(collectionOverrides?.admin || {}), }, fields,