I was wondering if the default "create" view for a collection can be edited in the same way that the "edit" and "list" views can be modified under admin.components.views
Hey
@264760868254777344
I'm about to blow your mind
So, the "Edit" view
isthe create view
The distinction that's used between create and update is
if we have a valid document id or notYou can easily get this yourself via a call to the
useDocumentInfohook
If the id is present, you are in an update view, otherwise no id implies it's being created
Wow, That's pretty smart
Thanks for the fast reply
If the id is present, you are in an update view, otherwise no id implies it's being created
This is actually how Paylaod makes the distinction internally
My pleasure my friend!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.