This line adds a custom List view to the collection, but does not spread the user's admin.components config back in: https://github.com/DennisSnijder/payload-workflow/blob/main/src/index.ts#L57. This means that when using this plugin, you cannot bring your own custom components with it. It's a simple fix:
// Collection.ts
{
// ...
admin: {
// ...
components: {
...collection?.admin?.components || {}, // THIS LINE FIXES IT
views: {
...collection?.admin?.components?.views || {},
List: WorkflowView(collectionPluginConfig)
}
}
}
}
This line adds a custom List view to the collection, but does not spread the user's
admin.components
config back in: https://github.com/DennisSnijder/payload-workflow/blob/main/src/index.ts#L57. This means that when using this plugin, you cannot bring your own custom components with it. It's a simple fix: