Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Overwrite Save

default discord avatar
agolovan2 years ago
2

Is that already released? const Config = {


admin: {


components: {


// changed

elements

to

edit

// to better scope custom components


edit: {


SaveButton: CustomSaveButton,


SaveDraftButton: CustomSaveDraftButton,


PublishButton: CustomPublishButton,


PreviewButton: CustomPreviewButton,


},



I am using custom field and would like to overwrite or add additional code on Save.

  • discord user avatar
    jarrod_not_jared
    2 years ago

    Yes that is released



    What version are you on?

  • default discord avatar
    agolovan2 years ago

    "payload": "^1.9.5",



    I think I put Edit in a wrong place, under fields.



    This works correctly


    const TagsCollection: CollectionConfig = {


    slug: TAGS_COLLECTION,


    admin: {


    useAsTitle: TAG,


    group: LINKABLE_GROUP,


    disableDuplicate: true,


    components: {


    edit: {


    SaveButton: CustomSaveButton,


    },


    },


    },



    Thank you!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.